in reply to Re^3: Spliting a delimited string into variables
in thread Spliting a delimited string into variables

I've never used hashes before so this will be some good fresh reading material. It looks relative to a really complex array. In your experience with hashes, once you have all the structure laid out, is it simple enough to reference slices in the hash like you would in an array? That is to say $names[0][1] would pull up the value in the second column of the first row of the matrix? Thank you again for your great references and starting points. I am excited to learn!

Replies are listed 'Best First'.
Re^5: Spliting a delimited string into variables
by jethro (Monsignor) on Apr 11, 2011 at 08:55 UTC

    Hashes are one of the most used features in perl and once you find out how useful they are you will never want to program in a language without hashes again.

    And yes, access is as simple as with arrays, $names{phil}{street} will get you phils street name, if you put it in there. Note that arrays have still their use, for example to store a matrix. Or for any data you need a sorted or defined sequence. But in my experience for data structures in 4 out of 5 cases a hash is the answer.