#!usr/bin/perl use strict; use warnings; my $string1 = "there here There here there Here"; my $string2 = $string1; print "$string1\n"; $string1 =~ s/N.*here\.//; print "$string1\n"; print "$string2\n"; $string2 =~ s/N.*?here\.//; print "$string2\n\n";