in reply to Re^3: non-scalar hash key
in thread non-scalar hash key
Well, a reference to an array is a scalar. So, perhaps something like:
prints:my @foo = qw/1 2 3 4 5 6/; my %bar = ( \@foo => 'elephants', ); my $zonk = \@foo; print "$bar{$zonk}\n";
elephants
Cheers,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: non-scalar hash key
by citromatik (Curate) on Jun 17, 2009 at 10:33 UTC | |
|
Re^5: non-scalar hash key
by kdejonghe (Novice) on Jun 17, 2009 at 10:13 UTC |