in reply to Re^3: Counting unique elements in an array
in thread Counting unique elements in an array
That is jumping through some hoops to avoid void.Well, yeah. I was posting them in sort of a humor/brainteaser vein rather than as a serious solution to a problem that is (as has been pointed out)
Incidentally, here's a method that benches about 9% faster than for_loop:
sub new_guy { my %sums; ++$_ for @sums{@array}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Counting unique elements in an array
by Random_Walk (Prior) on Feb 08, 2005 at 20:28 UTC |