|Do you know where your variables are?|
Re: Perl odditiesby jmcnamara (Monsignor)
|on Mar 01, 2005 at 10:40 UTC||Need Help??|
If you evaluate a hash in scalar context ... the value returned is a string consisting of the number of used buckets and the number of allocated buckets ...
I can't imagine that this is useful to anyone except the implementor of the hashing function and the occasional person with pathological data.
It would be much more useful, or sensible, if hash in a scalar context returned the number of keys:
And before anyone leaps to the defense of this artifact I'm just stating that I find it odd. I can live with it.
I think that there were a lot of things that I used to find odd but since I can't remember what they are I guess that I've just come to accept them. :-)