in reply to Re: finding the most popular in array
in thread finding the most popular in array
The other day I caught myself coding this same thing (boiling down a larger problem) but with this variation:
Thank goodness for TIMTOWDI.$hash{$_}++ for @array; %hash=reverse %hash; for (keys %hash) { $max = $_ > $max ? $_ : $max }; print $hash{$max}, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: finding the most popular in array
by Anonymous Monk on Sep 10, 2001 at 22:26 UTC |