Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: length or array in a hash

by SuicideJunkie (Priest)
on Nov 09, 2012 at 19:46 UTC ( #1003202=note: print w/ replies, xml ) Need Help??


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}  }


Comment on Re: length or array in a hash
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-08-23 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls