in reply to Define regex substitution $1,$2,... from a string
Lot's more discussion of this in the nodes linked from Re: Evaluating $1 construct in literal replacement expression, and thereunder.
Give a man a fish: <%-{-{-{-<