in reply to setting a scalar = to a hash?

You're getting the number of hash-buckets filled over the number of hash-buckets total. It's a completely useless value unless you plan on doing some really heavy debugging. In other words, it's not very useful.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: setting a scalar = to a hash?
by dave_the_m (Monsignor) on Oct 13, 2004 at 17:10 UTC
    It's a completely useless value
    Not completely useless :-) It can be used in a boolean context to determine whether the hash is empty.

    Dave.

      That's because hashes will return 0 if they're empty. It's special-cased. :-)

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.