in reply to Dynamically generating the replacement part of a substitution

More discussion on this and very similar topics under printig with variables in text, simple regular expression and s/// treat rhs as regex.
  • Comment on Re: Dynamically generating the replacement part of a substitution