<?xml version="1.0" encoding="windows-1252"?>
<node id="73571" title="Re: hash size" created="2001-04-18 16:54:22" updated="2005-07-27 05:46:53">
<type id="11">
note</type>
<author id="25235">
larsen</author>
<data>
<field name="doctext">
Another point from [perldata]. It could be useful for
a certain definition of &lt;i&gt;size&lt;/i&gt; :)...

&lt;blockquote&gt;
If you evaluate a hash in a scalar context, it returns a value which is true if and only if the hash contains any key/value pairs.  (If there are any key/value pairs, the value returned is a string consisting of the number of used buckets and the number of allocated buckets, separated by a slash.  This is pretty much useful only to find out whether Perl's (compiled in) hashing algorithm is performing poorly on your data set. For example, you stick 10,000 things in a hash, but evaluating %HASH in scalar context reveals "1/16", which means only one out of sixteen buckets has been touched, and presumably contains all 10,000 of your items.  This isn't supposed to happen.) 
&lt;/blockquote&gt;</field>
<field name="root_node">
73550</field>
<field name="parent_node">
73550</field>
</data>
</node>
