in reply to Re^2: Matching Character Patterns With Backreferences
in thread Matching Character Patterns With Backreferences

You should be using \1 and friends in the left hand side of the s/// operator.

Replies are listed 'Best First'.
Re^4: Matching Character Patterns With Backreferences
by gaal (Parson) on Dec 06, 2004 at 17:37 UTC
    Are you sure? I believe it's the other way around; you should use $1 and friends on the right hand side of the s/// operator. That's what the warning in perlre is about, anyway.
      What? Yes I'm sure. Of course you should use $1 on the right hand side of the s/// operator, as thats merely a double quoted string. The warning in perlre is regards to using \1 on the right hand side, which only works because of a hack.
        Gah, yes, of course. A thinko on my part.