Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: String Replace

by gwadej (Chaplain)
on Jun 17, 2009 at 18:07 UTC ( #772502=note: print w/ replies, xml ) Need Help??


in reply to String Replace

Change the last line to:

$proc_string =~ s/\Q$temp1\E/$temp2/g;

s/// does a regular expression substitute, you need \Q to quote meta-characters so they are matched exactly.

G. Wade


Comment on Re: String Replace
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2015-07-01 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls