Add \Q...\E in the search pattern. Now you will get the correct output.
$string =~ s/\Q$str2Brepl\E/$strRepl/mi; print "$string";
Prasad
In reply to Re: Debug and workaround help
by prasadbabu
in thread Debug and workaround help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |