Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: change all occurances of string1 into string2

by choroba (Cardinal)
on Nov 29, 2012 at 15:29 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1006277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found