Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re^2: Perl Help

by lidden (Curate)
on Jan 22, 2008 at 11:57 UTC ( [id://663551] : note . print w/replies, xml ) Need Help??

in reply to Re: Perl Help
in thread Perl Help

You want something like this:
my %hist; while(<$fh>){ ++$hist{ $_ } for split //; } for(sort{ $hist{ $b } <=> $hist{ $a } } keys %hist){ print "'$_' => $hist{ $_ }\n"; }
but you need to filter out the chars you don't want.