Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Extracting values from nested hashrefs

by kcott (Abbot)
on Sep 12, 2012 at 09:25 UTC ( #993196=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
    my @sorted_humps;
    push @sorted_humps, $_->{humps} for map { $animals->{$_} } @sorted_ani
    +mals;
    say "Sorted humps: @sorted_humps";
    
  2. or download this
    $ pm_nested_hash_extract.pl
    Unsorted humps: 2 0 1
    Sorted humps: 0 1 2
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-07-03 07:34 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 (48 votes), past polls