in reply to Regarding Hashes of Arrays
Nope! What you want are these:
$hash{$key} = [ 1,2,3 ]; # Note the square brackets $hash{$otherkey} = [ @temp ]; # same same $hash{$key2} = \@temp;
The first two create a reference to an anonymous array that has a copy of the contents. The last one creates a reference to an existing array.
And to access them, it's just ...
$hash{$key}[0]
See perlreftut, perldsc, perlref, and perllol for more information
|
|---|