in reply to Dereferencing a Hash of Arrays
You have two problems:
my %alphabet = \( 'a' => @atags, 'b' => @btags, );
You are using a list reference which produces a list of references, so your hash is the same as:
my %alphabet = ( \'a' => \@atags, \'b' => \@btags, );
say for @{values %alphabet};
The construct @{} dereferences an array reference but values %alphabet does not return an array reference, it returns a list.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dereferencing a Hash of Arrays
by toro (Beadle) on Jun 14, 2011 at 07:33 UTC | |
by johngg (Canon) on Jun 14, 2011 at 10:40 UTC |