Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Non-deprecated way to access multi-level hashes

by markov (Scribe)
on Mar 07, 2006 at 15:19 UTC ( #534941=note: print w/replies, xml ) Need Help??


in reply to Non-deprecated way to access multi-level hashes

use map() to slice:
 my @realnames = map { $_->{realname} } values %names;
  • Comment on Re: Non-deprecated way to access multi-level hashes

Replies are listed 'Best First'.
Re^2: Non-deprecated way to access multi-level hashes
by linux454 (Pilgrim) on Mar 07, 2006 at 21:33 UTC
    This is the most efficient solution. I wish I could recall exactly where I have read that maps() are more efficient than foreach. Perhaps in Advanced Perl Programming, or not.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://534941]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-05-01 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (544 votes). Check out past polls.