* P lerenard ([EMAIL PROTECTED]) [26 Jun 2001 21:48]:
> HI,
> that's not $#hash, so it is...

my $hashsize = keys %hash;

i.e. keys %hash returns an array of keys, and arrays used in a scalar
context evaluate to the size of the array.

Or:

print "I have ".(scalar keys %hash)." keys in my hash.\n";


cheers,
-- 
iain.                                          <http://eh.org/~koschei/>

Reply via email to