Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Turning foreach into map?

by Roy Johnson (Monsignor)
on Apr 05, 2005 at 22:59 UTC ( [id://445122]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Turning foreach into map?
in thread Turning foreach into map?

In theory, the only difference between map and for/foreach now is a matter of taste/style.
And the ability to have a named variable as your index.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^5: Turning foreach into map?
by Anonymous Monk on Apr 06, 2005 at 08:48 UTC
    And the context of the (last) expression in the block. For for, it's in void context, for grep it's in scalar context, for map it's in list context.

Log In?
Username:
Password:

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

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

    No recent polls found