in reply to Hash question
Each entry in a hash is a scalar, so it contains just one value. However, this value can be a reference to an array. You should see perlref for details.
You can put an array reference into your hash using
$hash{key} = \@my_array; # the \ makes it a reference or $hash{ket} = [1, 23, 37];
You can put individual entries in your hash using:
$hash{key}->[0] = 1; $hash{key}->[1] = 23;
To get them out again use $hash{key}->[0] etc, or get the whole array using @array = @{$hash{key}}.
|
|---|