Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
thezip is randomly reminded of Hugo's_house_of_ho rrors
[LanX]: such much?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2017-03-24 18:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.