in reply to Re: Dereferencing a Hash of Arrays
in thread Dereferencing a Hash of Arrays
input:
my @atags = qw( 1 2 3 4 ); my @btags = qw( 9 8 7 6 ); my %alphabet = ( 'a' => \@atags, 'b' => \@btags, ); say for values %alphabet;
output:
ARRAY(0x8376dd8) ARRAY(0x837f298)
UPDATE: I did say for values %alphabet in response to an earlier version of Re^1 without the @{...}. My original code was my %alphabet = ('a', \@atags, 'b', \@btags); say for @{values %alphabet}; which prints an error similar to the OP.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dereferencing a Hash of Arrays
by johngg (Canon) on Jun 14, 2011 at 10:40 UTC |