in reply to Easier Way?
Hmm. values?
my %hash2; for my $val (sort values %hash2) { if(exists $hash2{$val}) { $hash2{$val}++; } else { $hash2{$val} = 1; } }
Not much shorter, but a bit easier to read....
--
F
o
x
t
r
o
t
U
n
i
f
o
r
m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Easier Way?
by thelenm (Vicar) on Aug 28, 2002 at 21:49 UTC |