in reply to Effecicncy of key-only hash
I usually do it this way:
my %hash1; @hash1{qw/shave the modern way/}= ();
Even if I don't need the actual counter, I prefer this over++$hash{$the_word_just_read};
$hash{$the_word_just_read}= undef; # or 1 or ''
To be honest: I don't really care for the efficiency of that.
|
|---|