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:

Can't use string ("2") as an ARRAY ref while "strict refs" in use at ./concat.pl line 9 (#1) (F) Only hard references are allowed by "strict refs". Symbolic references are disallowed. See perlref. Uncaught exception from user code: Can't use string ("2") as an ARRAY ref while "strict refs" in use +at ./concat.pl line 9. at ./concat.pl line 9

Replies are listed 'Best First'.
Re^3: Dereferencing a Hash of Arrays
by chromatic (Archbishop) on Jun 14, 2011 at 17:47 UTC

    From perldoc values:

    (In a scalar context, returns the number of values.)

    You'll see the error to which I alluded if you print the keys of the hash.