Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Answer: How can I find the number of elements in a hash?

by sot3 (Initiate)
on Aug 12, 2010 at 19:47 UTC ( #854747=categorized answer: print w/replies, xml ) Need Help??

Q&A > hashes > How can I find the number of elements in a hash? - Answer contributed by sot3

Use this: $size = scalar keys %hash;

  • Comment on Answer: How can I find the number of elements in a hash?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the radiator hisses contentedly...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2016-12-11 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.