I'm trying to work out how Perl substitutions work. We're told that backreference patterns can be used in the substitution by specifying \1, \2 (etc), but it doesn't seem to work.
The docs don't just "tell" they give working examples of stuff
See perlvar#Variables related to regular expressions, perlrequick, Re: perldoc of s///ee wrong or just misleading? (read more)
In reply to Re: Substitution backreference woes
by Anonymous Monk
in thread Substitution backreference woes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |