Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: $_ getting clobbered by inner loop.by lestrrat (Deacon) |
on Apr 08, 2008 at 23:50 UTC ( [id://679109]=note: print w/replies, xml ) | Need Help?? |
while (<>) places each line to $_, and $_ is a global, so there.
to avoid it (or actually, as a general rule), don't use $_ gratuitously. use an explicit variable.
In Section
Seekers of Perl Wisdom
|
|