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

Yup. s/.../.../ee is the same as s/.../eval .../e

Replies are listed 'Best First'.
Re^5: How to do regex backreferences within $variable replacement text?
by ManFromNeptune (Scribe) on Sep 17, 2005 at 21:08 UTC
    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>
      There is: eval.