Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to $_ getting clobbered by inner loop.

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.
  • Comment on Re: $_ getting clobbered by inner loop.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://679109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found