This is wrong. There is absolutely no reason to iterate the hash to count the elements!
c:\test>p1 Perl> %a = 'a' ..'z';; Perl> print scalar values %a;; 13 [0] Perl> print scalar keys %a;; 13
In reply to Re^2: Count of HoA elements
by BrowserUk
in thread Count of HoA elements
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |