in reply to Counting using transliteration

This will give you all the characters including newline, spaces, etc.
use strict; use Data::Dumper; my %character_hash = (); while (<DATA>) { map { $character_hash{$_}++ } split//,$_; } print Dumper(\%character_hash); __DATA__ AFJIDIKSOIJFKDFS AKDFJIJDFJSF QUEWITYYUERYUIYE ERUOIERTOUTUT