use strict; use warnings; my $string = "foo LAST\n" ." blftz\n" ."LINE fum\n" ; print "MATCH\n" if ($string =~ m/LAST$ .* ^LINE/xms) ;
You could solve this with:
print "MATCH\n" if ($string =~ m/LAST$ ..? ^LINE/xms) ;
In reply to Re^3: Disambuating $ in (especially /m) regexps
by BillKSmith
in thread Disambuating $ in (especially /m) regexps
by tlhackque
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |