RosettaCodeData/Task/Letter-frequency/Perl/letter-frequency.pl

3 lines
92 B
Perl
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
while (<>) { $cnt{lc chop}++ while length }
print "$_: ", $cnt{$_}//0, "\n" for 'a' .. 'z';