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.
In reply to Re: String Replace
by gwadej
in thread String Replace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |