Using keys in scalar context will return the number of keys in the hash:
my $keylen = keys %data; print $keylen;
In reply to Re: find a number of keys in a hash
by jwkrahn
in thread find a number of keys in a hash
by perlthirst
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |