Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My current knowledge of hashes is to create a hash with unique keys. So, if given a group of people, I can create something like this:
What I am trying to figure out how to create is something like this instead:'Bob Dole' => { 'address' => '123 peach st.', 'spouse' => 'Bill Clinton', 'father' => 'Frank Dole' }, 'Al Pacino' => { 'address' => '123 orange st.', 'spouse' => 'Robert Deniro', 'father' => 'Marlon Brando' } ...
I'm having a difficult time finding the right search terms to get some sort of tutorial that helps me with this one. A nudge in the right direction would be greatly appreciated.'People' => { 'name' => 'Bob Dole', 'address' => '123 peach st.', 'spouse' => 'Bill Clinton', 'father' => 'Frank Dole' }, { 'name' => 'Al Pacino', 'address' => '123 orange st.', 'spouse' => 'Robert Deniro', 'father' => 'Marlon Brando' } ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Question regarding hash with multiple values
by toolic (Bishop) on Jul 10, 2013 at 01:02 UTC | |
Re: Question regarding hash with multiple values
by AnomalousMonk (Archbishop) on Jul 10, 2013 at 05:09 UTC | |
by sundialsvc4 (Abbot) on Jul 10, 2013 at 12:18 UTC | |
Re: Question regarding hash with multiple values
by 5mi11er (Deacon) on Jul 10, 2013 at 01:24 UTC | |
Re: Question regarding hash with multiple values
by BillKSmith (Monsignor) on Jul 10, 2013 at 13:59 UTC | |
by Skeeve (Parson) on Jul 10, 2013 at 18:35 UTC |
Back to
Seekers of Perl Wisdom