jwexfyfz has asked for the wisdom of the Perl Monks concerning the following question:
How would I print "Santa Claus" (name of owner1Ref) by accessing it through account?# Braces denote an anonymous hash my $owner1Ref = { "name" => "Santa Claus", "DOB" => "1882-12-25", }; my $owner2Ref = { "name" => "Mickey Mouse", "DOB" => "1928-11-18", }; # Square brackets denote an anonymous array my $ownersRef = [ $owner1Ref, $owner2Ref ]; my %account = ( "number" => "12345678", "opened" => "2000-01-01", "owners" => $ownersRef, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash within an array within a hash
by Rudolf (Pilgrim) on Sep 06, 2012 at 22:55 UTC | |
|
Re: hash within an array within a hash
by Kenosis (Priest) on Sep 07, 2012 at 01:48 UTC | |
|
Re: hash within an array within a hash
by kcott (Archbishop) on Sep 07, 2012 at 06:54 UTC | |
|
Re: hash within an array within a hash
by bergbrains (Acolyte) on Sep 07, 2012 at 01:18 UTC |