You have to count, unless you're OK with an approximation.
print chr(rand(3)+65);It's short, runs in constant time, and is right 1/3 of the time. :-)
In reply to Re: Quick way to find the letter with the most occurences in a string
by wanna_code_perl
in thread Quick way to find the letter with the most occurences in a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |