On 5/2/06, Rance Hall <[EMAIL PROTECTED]> wrote:
the set of hash keys is what the computer uses to find values in the hash, and in order to optimize your code and make searching the hash for specific values as fast as possible, you should WANT your key to be as short and simple as possible but still make sense when you need to debug your code. HTH
This really isn't true, as you can see from the previous replies. One of the most frequent uses of hashes is to keep track of how often you've seen something. E.g.: my %seen; my @items = qw/aaa bbb aaa bbb ccc aaa bbb ddd rrr eee eee/; foreach (@items) { $seen{$_}++ } while (my ($k,$v) = each %seen) { print "item $ seen $v times\n"; } When a hash is used this way, the key will almost always be larger than the value. HTH, -- jay -------------------------------------------------- This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] private and confidential daggerquill [at] gmail [dot] com http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org values of β will give rise to dom!