Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$hash{$id} = (1,2,3);
my @temp = (1,2,3); $hash{$id} = @temp;
Now, when accessing a value in an array in a hash, is this correct:
@{$hash{$id}}[0]
Or is this:
${$hash{$id}}[0]
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regarding Hashes of Arrays
by chromatic (Archbishop) on Aug 10, 2004 at 19:56 UTC | |
|
Re: Regarding Hashes of Arrays
by Joost (Canon) on Aug 10, 2004 at 19:59 UTC | |
by hardburn (Abbot) on Aug 10, 2004 at 20:16 UTC | |
by Joost (Canon) on Aug 10, 2004 at 20:30 UTC | |
by hardburn (Abbot) on Aug 10, 2004 at 20:51 UTC | |
by Joost (Canon) on Aug 10, 2004 at 20:59 UTC | |
|
Re: Regarding Hashes of Arrays
by duff (Parson) on Aug 10, 2004 at 19:59 UTC | |
|
Re: Regarding Hashes of Arrays
by johnnywang (Priest) on Aug 10, 2004 at 19:55 UTC | |
|
Re: Regarding Hashes of Arrays
by hardburn (Abbot) on Aug 10, 2004 at 19:58 UTC |