in reply to Problem with variable that contains certain characters in replacement side of regex substitution.
Perl wants to add escape charactersNo, Perl does not want to, you tell it to do so by using \Q. \Q is usually only needed in the pattern, not in the replacement part of the substitution. Remove it and Perl will behave.
BTW, backslash must be backslashed in double quotes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with variable that contains certain characters in replacement side of regex substitution.
by JTomb (Initiate) on May 11, 2013 at 19:44 UTC |