while(my $c = getc(FILE)) { $count{lc($c)}++ if $c=~/[a-zA-Z]/; }