laziness, impatience, and hubris | |
PerlMonks |
Re: my $1by grinder (Bishop) |
on Apr 23, 2009 at 20:33 UTC ( [id://759655]=note: print w/replies, xml ) | Need Help?? |
$1 and $2 are package variables, not lexicals. You can nest their contents with local. Lexical $_ is a new addition from 5.10.0 onwards. Best practice is simply to copy out $1 and ilk to lexicals, the way you're doing it (but within a conditional, checking that the match succeeded). • another intruder with the mooring in the heart of the Perl
In Section
Seekers of Perl Wisdom
|
|