Think about Loose Coupling | |
PerlMonks |
Re: This regex surprised meby Athanasius (Archbishop) |
on Aug 13, 2014 at 17:17 UTC ( [id://1097322]=note: print w/replies, xml ) | Need Help?? |
Printing the pre-compiled regex, I get:
and from perlre#Extended-Patterns it appears that this is equivalent to (?ud-imsx:^ab$), which explicitly turns off the m modifier throughout of the embeded pattern-match modifier. So adding /m to the regex has no effect, because it is overridden within the (?-m:...) construct inside the regex. I don’t know how all this worked in earlier versions of Perl, but in recent versions, it seems you have to add the /m modifier when the regex is first constructed using qr//:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|