From perldoc perlop and searching for transliteration we discover that
So that may be part of your issue, or at least it will be when you remove the g modifier which makes no sense with athe tr opperatorBecause the transliteration table is built at compile time, neither th +e SEARCHLIST nor the REPLACEMENTLIST are subjected to double quote interpolation. That means that if you w +ant to use variables, you must use an eval(): eval "tr/$oldlist/$newlist/"; die $@ if $@;
|
|---|