Perl Monk, Perl Meditation | |
PerlMonks |
Re: length or array in a hashby SuicideJunkie (Vicar) |
on Nov 09, 2012 at 19:46 UTC ( [id://1003202]=note: print w/replies, xml ) | Need Help?? |
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} }
In Section
Seekers of Perl Wisdom
|
|