in reply to dividing numbers

You can replace the whole if-elsif paragraph with just
my %count_of; if (/([ACDEFGHIKLMNPQRSTVWY])/) { $count_of{$1}++ }
As for the result, do not use double quotes around arithmetical operations. With the hash suggested above you can just:
print RESULT join ' ', $id, map $count_of{$_}/$tt, qw/A C D E F G H I K L M N P Q R S T V W Y/ +; print "\n";