Doug Johnson wrote:
>
> Is there a similar way to find the number of keys in a hash without cycling
> through them and without assigning the hash to an array?
Dunno if you can avoid counting them, but $keycount = keys(%hash) will
do what you want. Hopefully there's an optimization somewhere in Perl's
guts for this sort of thing :)
Cheers,
- Matt
- Find the number of elements in a hash. Doug Johnson
- Re: Find the number of elements in a hash. Mathew Hennessy
- Re: Find the number of elements in a hash. Brett W. McCoy
- Re: Find the number of elements in a hash. Paul
- Re: Find the number of elements in a hash. Jeff 'japhy' Pinyan
- Re: Find the number of elements in a hash... Paul
- Re: Find the number of elements in a ... Jeff 'japhy' Pinyan
- RE: Find the number of elements in a hash. Doug Johnson
