Perl: the Markov chain saw | |
PerlMonks |
Re^5: Regexp substitution using variablesby MikeTaylor (Acolyte) |
on Nov 26, 2020 at 10:34 UTC ( [id://11124256]=note: print w/replies, xml ) | Need Help?? |
Sorry, I think I was using the term "back-reference" incorrectly. I didn't mean referring back within the pattern to something earlier in the pattern, but referring in the substitution string to a captured sub-expression of the pattern. Something like s/(foo|bar)/He said "$1"/.
In Section
Seekers of Perl Wisdom
|
|