use List::Util 'reduce'; use 5.010; my %hash; $hash{$_}++ for split //, $my_string; say "Most frequent: ", reduce {$hash{$a} > $hash{$b} ? $a : $b} keys % +hash;
In reply to Re: Quick way to find the letter with the most occurences in a string
by JavaFan
in thread Quick way to find the letter with the most occurences in a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |