Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: Creating Multidimensional Hashed Arrays?
in thread Creating Multidimensional Hashed Arrays?

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
  • Comment on Re^3: Creating Multidimensional Hashed Arrays?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791803]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2025-07-15 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.