Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Explanation of mapping and undef

by broquaint (Abbot)
on Jun 08, 2004 at 11:09 UTC ( #362277=note: print w/ replies, xml ) Need Help??


in reply to Explanation of mapping and undef

next if exists { map {$_ => undef } qw(city state country) } -> { $field };
This is creating a temporary anonymous hash where the keys are the values in the qw// and then checking for the existence of $field in that hash. For a breakdown of a similar usage of temporary anonymous hashes see. Re: Re: Re: Unique values in array.
HTH

_________
broquaint


Comment on Re: Explanation of mapping and undef
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-12-22 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls