in reply to End of line anchor question
use warnings; use strict; while (<DATA>) { my $pat = $_; $pat =~ s/_x_x$//i; #This is not working. $pat =~ s/_x_s$//i; #This is working. $pat =~ s/_x$//i; #This is not working. print $pat; } __DATA__ foo_x_x boo_x_s moo_x
Prints:
foo boo moo
What does $pat have before s///? See also:
|
|---|