my %trans = ( 1 => "one", 2 => "two", ... z => "zulu", ) ; #<---note semi-colon foreach (split //, $line) { ....