![]() |
|
There's more than one way to do things | |
PerlMonks |
Re^3: Creating Multidimensional Hashed Arrays?by GrandFather (Saint) |
on Aug 28, 2009 at 02:02 UTC ( [id://791803]=note: print w/replies, xml ) | Need Help?? |
Draw your data out on a piece of paper with a box around each data item (nested as appropriate). Where sensible give boxes names. Each named box is a key/value pair and should be in a hash. Each unnamed box is an array element. The nesting of the boxes tells you how the hash and array elements nest. Keep your piece of paper around to refresh you understanding of how the data hangs together as you write the code. At each point that you need to access something you need to work from the outermost box to the box of interest taking note of whether each box is an array element or a hash value. True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|