Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Different behaviors between "while" and "map"

by ikegami (Patriarch)
on Dec 06, 2008 at 06:09 UTC ( [id://728499]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Different behaviors between "while" and "map"
in thread Different behaviors between "while" and "map"

Technically, you're both right, because

while ($_ = <SOME_FILE_HANDLE>){ ... }
is expanded to
while (defined ($_ = <SOME_FILE_HANDLE>)) { ... }

But all this is irrelevant. It's not the magical expansion of <> that causes the scalar context.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found