in reply to Re^4: How to do regex backreferences within $variable replacement text?
in thread How to do regex backreferences within $variable replacement text?

Ok, thanks... but really I'm trying to avoid using eval() (or /e) in the first place.

<RANT> Seeing as Perl lets you specify regex patterns in variables used for search text (s/$pattern/), it really seems like there ought to be a non-kludgy way to interpret backreferences from a variable in the replacement text (s/$pattern/$replacecontainsbackrefs/) ... </RANT>
  • Comment on Re^5: How to do regex backreferences within $variable replacement text?

Replies are listed 'Best First'.
Re^6: How to do regex backreferences within $variable replacement text?
by BUU (Prior) on Sep 17, 2005 at 22:19 UTC
    There is: eval.