Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by Roy Johnson (Monsignor)
on Apr 08, 2005 at 13: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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-07-20 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (422 votes). Check out past polls.

    Notices?