Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: change all occurances of string1 into string2

by choroba (Canon)
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 imbibing at the Monastery: (6)
As of 2015-01-26 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (186 votes), past polls