$string="this is a test. this is another test"; $string =~ s/is.*/is not/; print "$string\n"; # Turning off greed $string="this is a test. this is another test"; $string =~ s/is.*?/is not/; print "$string\n";