http://www.perlmonks.org?node_id=446071


in reply to Re^2: How to use a variable in tr///
in thread How to use a variable in tr///

I think I'd probably want to precompile too if this was to be used repeatedly.
my $tr = eval "sub { tr/\Q$oldlist\E/\Q$newlist\E/ }" or die $@; &$tr for $things, $that, $i, $want, $to, $transliterate;