Replace pattern
use strict; use warnings; my $string = "Hello to the world"; our $_ = $string; print "The original string is: \"$_\"\n"; s/planet/world/; print "s/planet/world/ changes string: $_ \n\n";