Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: change all occurances of string1 into string2

by choroba (Abbot)
on Nov 29, 2012 at 15:29 UTC ( #1006277=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    s/$thing/$translate{$thing}/g;
    
  2. or download this
    my $re = join '|', keys %translate;
    $re = qr/($re)/;
    ...
        s/$re/$translate{$1}/g;
        print;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2014-08-31 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls