rje has asked for the wisdom of the Perl Monks concerning the following question:
my %sample = ( [ 1, 2, 3, 4 ] => [ 5, 6, 7, 8 ] ); my $key; foreach $key (keys %samples) { my @a = @$key; my @b = @{$sample{ $key }}; print "key=@a\nvalue=@b\n"; }
Perl is not allowing me to dereference $key.
However, the value referred to is freely accessible.
I just don't understand what I'm doing wrong.
Rob
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Hash of refs to refs
by jeffa (Bishop) on Dec 01, 2001 at 00:42 UTC | |
|
Re: Hash of refs to refs
by lestrrat (Deacon) on Dec 01, 2001 at 00:46 UTC | |
by rje (Deacon) on Dec 01, 2001 at 02:18 UTC | |
by jeffa (Bishop) on Dec 01, 2001 at 20:24 UTC |