in reply to Problem with variable that contains certain characters in replacement side of regex substitution.

Perl wants to add escape characters
No, 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.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re: Problem with variable that contains certain characters in replacement side of regex substitution.
  • Select or Download Code

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
    Thanks! That did it. Not sure why I thought to use \Q the way I did.

    Joe