in reply to Use Hash? Array? Still confused after all these years.

Coming from a database background, I think of a hash as a row from a database table. The keys are analagous to the column names while obviously the hash values correspond to row values. When I need to deal with table data I use an array of hashes. Check out Data Structures Tutorial as well as Data Dumper for more information.

Replies are listed 'Best First'.
Re^2: Use Hash? Array? Still confused after all these years.
by TutEtan (Initiate) on Jul 22, 2005 at 23:04 UTC
    Coming from a database background, *I* think of a hash as a database index. The keys are analagous to the primary key values while obviously the hash values correspond to a row of fields. When I need to deal with table data I use a hash of arrays.