Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: When is $_ local and when is it not?

by HyperZonk (Friar)
on Jul 13, 2001 at 17:21 UTC ( [id://96380]=note: print w/replies, xml ) Need Help??


in reply to When is $_ local and when is it not?

I'll admit that this is pretty much just a guess. I think it may have something to do with the fact that the for construction essentially builds a list from <DATA>, which it then iterates over, while while pumps the data items one at a time into $_. I could very well be very wrong, but I think this may be a place to start looking for an answer.
update: In looking at converter's reply in the thread, I see that the correct answer is given there. I wonder if that has something to do with the fact that the for construction builds a hidden list? Perl_guts wizards can fill us in, perhaps.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-29 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found