Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Slicing a hash reference from a collection of hash references within a hash reference

by nysus (Parson)
on Oct 07, 2015 at 15:21 UTC ( [id://1144070]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $household = { 23 => { last => 'Smith', first => 'Mary' }, 
                   22 => { last => 'Jones', first => 'Bob' }
    };
    
  2. or download this
    my $key = 23;
    my $person = $household->{$key};
    my %name = %$person;
    my @slice = @name{'first', 'last'};
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1144070]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-23 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found