That's because you're performing your transliteration on the value of $Uni, and using it as a hash key, but then when you output to the new file, you're outputting the hash's value as indexed by the key. The value itself started out as $line, and was never altered in your code (aside from being chomped).