Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-09-19 05:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls