Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Answer: How do I localize $_ in while loops?

by Roy Johnson (Monsignor)
on Nov 03, 2003 at 22:30 UTC ( #304269=categorized answer: print w/replies, xml ) Need Help??

Q&A > input and output > How do I localize $_ in while loops? - Answer contributed by Roy Johnson

Please note that shift does not populate $_ by default, so ajdelore's "Another way to do it" is not. The assignment still has to be explicit.

  • Comment on Answer: How do I localize $_ in while loops?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[LanX]: I thought MST perl was obvious ;-)
[RonW]: I have so much accumulated in my memory that finding the right item at a given moment often fails

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-08-18 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (310 votes). Check out past polls.

    Notices?