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

Re: A hint about using map

by jdporter (Paladin)
on Apr 06, 2005 at 03:34 UTC ( [id://445158]=note: print w/replies, xml ) Need Help??


in reply to A hint about using map
in thread Turning foreach into map?

One of the things you always want to do with map is to use it to do a transformation on a list of strings.
Huh?
@findings = map { $_->{$x} ? [ $_->{$y}, keys %$_ ] : () } @hashrefs;
Here I'm slinging just references and numbers. And using the map to do a greppy thing at the same time.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-25 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found