laziness, impatience, and hubris | |
PerlMonks |
Re: Should we Localize $_ ?by bikeNomad (Priest) |
on Jun 13, 2001 at 23:16 UTC ( [id://88169]=note: print w/replies, xml ) | Need Help?? |
One of the reasons we don't see it often is that $_ is usually used in a context close to where it's set. So we see it used inside foreach loops, inside of <> constructs, etc. Usage of $_ is rare (in my experience) outside of an explicit context that sets it. You'd have to be calling a subroutine that modifies $_ without providing a context that sets it to have a problem like this.
In Section
Seekers of Perl Wisdom
|
|