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?