in reply to Using variables with tr///
Also from perlop:
Note that because the transliteration table is built at compile time, neither the SEARCHLIST nor the REPLACEMENTLIST are subjected to double quote interpolation. That means that if you want to use variables, you must use an eval(): eval "tr/$oldlist/$newlist/"; die $@ if $@; eval "tr/$oldlist/$newlist/, 1" or die $@;
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Using variables with tr///
by DrManhattan (Chaplain) on Jul 17, 2000 at 19:59 UTC | |
RE: Re: Using variables with tr///
by greenhorn (Sexton) on Jul 17, 2000 at 12:05 UTC | |
Re: Re: Using variables with tr///
by frankus (Priest) on Nov 14, 2001 at 21:24 UTC |
In Section
Seekers of Perl Wisdom