in reply to How To Do This Better?

I came up with this. It's less code than yours (well, if you spread your code out a bit :), but it's actually a bit slower, in benchmarking. So there may be better ways of going about it.
#!/usr/local/bin/perl -w use strict; my %count; s/([a-zA-Z])/{ $count{lc $1}++; $1 }/eg while <>; for my $letter (sort keys %count) { print $letter, "=", $count{$letter}, "\n"; }
It works by finding a letter ("a-zA-Z"), lower-casing it, and increasing the count of that letter; and it does so for each letter that it finds.