Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Extracting values from nested hashrefs

by choroba (Canon)
on Sep 12, 2012 at 09:45 UTC ( #993200=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Extracting values from nested hashrefs
in thread Extracting values from nested hashrefs

You can use

map $_->{humps}, values %$animals;
If your structure becomes even more complicated (e.g. different level of nesting), you should use recursion (or CPAN).
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: Extracting values from nested hashrefs
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2015-07-07 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls