in reply to Data Structures

The Camel Book has a great discussion of Data Structures: Lists of List, Lists of Hashes,
Hashes of Lists, Hashes of Hashes, and points you in the direction of learning more. I
probably read that section at least once a week so it sinks in. Very handy in loading values from
a database where you want to manipulate the values very fast (since hashes are faster and safer than
working with the data in the database directly):
while (!$recordset->eof) { # code to set scalars equal to fields in $recordset $hashofrecordset{$id} = { foo => $foo, bar => $bar, baz => $baz, +}; }
foreach $outerkey ( sort keys %hashofrecordset ) { print "\n$hashofrecordset{$outerkey}\n"; foreach $innerkey ( sort keys %{ $hashofrecordset{$outerkey} + }) { print "\t$hashofrecordset{$outerkey}{$innerkey}\n"; } print "\n"; }
That's the basic idea anyway. take care!