He asked for the number of elements in the HoA. I took that to mean 5 for the following structure:
my %h = ( k1 => [ qw( a b c ) ], k2 => [ qw( d e ) ], );
Your solution simply returns the number of elements in a hash. It could be that's what he meant, but that's now how I interpreted his question.
This is wrong.
Not so hasty on the wrong. Fletch and Jenda also interpreted the question like I did.
In reply to Re^3: Count of HoA elements
by ikegami
in thread Count of HoA elements
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |