DelphiFAQ Home Search:
General :: Programming :: perl
General questions about perl.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

Size of a perl associative array (hash)

Question:

How can I print the number of elements in my associative array?

Answer:

You can use the keys operator.

print "Hash size: " . keys( %hash ) . "\n";

Generated 8:02:35 on Aug 19, 2017