in reply to Re: //s modifier
in thread //s modifier
AFAIK you will need either the /m or /s operator - otherwise your regex will only ever look at a single line.
No, that's not true, see below one-liner.
perl -e '$t="hello\nmoto";print "yep\n" if $t=~m/hello\smoto/;'All the s modifier does is to change dot (.) to match newline characters and all the m modifier does is to make ^ and $ match at the beginning/end of each line instead of the whole string. See perldoc perlre.
|
|---|