Problems? Is your data what you think it is? | |
PerlMonks |
Re: Matching against $_ behaves differently than matching against a named scalar?by rsFalse (Chaplain) |
on Apr 23, 2020 at 21:53 UTC ( [id://11115987]=note: print w/replies, xml ) | Need Help?? |
A possible way to overcome it without using a lexical variable inside a loop: to make a successful match to reset $1, $2...
Also, it is possible to 'control flow', being inside regex: That way of using regex (with (?{ <code> }) construct) is useful for debugging.
In Section
Seekers of Perl Wisdom
|
|