Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by Roy Johnson (Monsignor)
on Apr 08, 2005 at 09:27 UTC ( #446013=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval sprintf "tr/%s/%s/", map quotemeta, $oldlist, $newlist;
    
  2. or download this
    eval "tr/\Q$oldlist\E/\Q$newlist\E/";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://446013]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2019-10-19 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?