Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Extracting values from nested hashrefs

by kcott (Archbishop)
on Sep 12, 2012 at 09:25 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://993196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found