in reply to Re: Counting keys with defined or undefined elements in a hash
in thread Counting keys with defined or undefined elements in a hash
This should be about twice as fast for large hashes...
my $defined = grep defined, values %h; my $notdefined = keys(%h) - $defined; print "defined - $defined\n"; print "not defined - $notdefined\n";
-sauoq "My two cents aren't worth a dime.";
|
|---|