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

DOH, just realized that you had "/ee" ... tried that and it did indeed work :) But this is still basically an eval(), right?
  • Comment on Re^3: How to do regex backreferences within $variable replacement text?

Replies are listed 'Best First'.
Re^4: How to do regex backreferences within $variable replacement text?
by ikegami (Patriarch) on Sep 17, 2005 at 21:00 UTC
    Yup. s/.../.../ee is the same as s/.../eval .../e
      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.