$hash{$_}++ foreach @array; foreach keys %hash { $max = $_ if $hash{$_} > $hash{$max} }; print $max, "\n";
In reply to Re: finding the most popular in array
by Anonymous Monk
in thread finding the most popular in array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |