![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: saving matching pattern with flip-flop operatorby bart (Canon) |
on Jun 23, 2011 at 10:54 UTC ( #911055=note: print w/replies, xml ) | Need Help?? |
You could use $1, but I expect problems with retained old values if the regex didn't match.
So I prefer to directly, explicitly capture the captured value. Like this: BTW | is for bitwise or; you (ought to) want either or or ||.
In Section
Seekers of Perl Wisdom
|
|