If you don't want to grep for defined values, delete the values instead of setting them to undef, then you can the output of scalar %hash.
See perldata on what exactly the scalar value of a hash is.
Update: fixed syntax error. Sorry for not writing the update notice in the first place.
In reply to Re: hash count
by moritz
in thread hash count
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |