Hello everyone,

I want to count hash keys.  I originally tried

my $count = scalar %hash;

which when printed gave the string 411/1024.  I looked this up in 
perldoc perldata and sort of understand the significance of this result in 
terms of buckets.

So I tried this in a driver where I varied the size of the test hash:

my $count = scalar (keys %hash);
print "$count\n";

and it seemed to work.  I just want to make sure that this is in fact a true 
result that applies to hashes of any size, and not some crazy perl-guts 
coincidence.

I skimmed the llama, camel, and cookbook, but I guess what I am wanting to do 
is so basic it doesn't need [readily apparent] mention.

thanks,

nathanael


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to