in reply to How can I find the number of elements in a hash?

The easiest way is to have the keys function evaluated in scalar context:

%hash = ('foo'=>1, 'bar'=>3); $count = keys %hash;