in reply to Re: hash count
in thread hash count
I usually use "scalar keys %hash" to find how many pairs are in a %hash.
scalar grep defined($_) values %hash
I think that should be:
scalar grep defined, values %hash;
or
scalar grep { defined } values %hash;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: hash count
by AnomalousMonk (Archbishop) on Mar 25, 2009 at 15:22 UTC | |
by moritz (Cardinal) on Mar 25, 2009 at 15:24 UTC | |
|
Re^3: hash count
by moritz (Cardinal) on Mar 25, 2009 at 15:15 UTC |