http://www.perlmonks.org?node_id=1003202


in reply to length or array in a hash

You're printing the length of a string that goes something like "ARRAY(0xDEADBEEF)"

You need to dereference the arrayref: my $itemCount = @{ $hash{three} };  my $lastIndex = $#{ $hash{three}  }