in reply to Re^3: regex switch trouble
in thread regex switch trouble

When you put executable perl code into the replacement (right-hand) portion of s///e , I think you are by nature using "eval" to execute that code.

Nope, that's /ee, which in fact is discouraged and rarely used nowadays, that I can see. /e is not associated with the same issues. Thinking of all these matters, however, one can only appreciate even more how good they are doing with the new rules.

Replies are listed 'Best First'.
Re^5: regex switch trouble
by graff (Chancellor) on Jun 24, 2007 at 17:35 UTC
    Well, okay, thanks... I really don't enough about the perl internals involved with this operator to assert otherwise, and I'll admit I was "guessing" about this (hence the hedging phrase "...I think...")

    Still, perlop does describe the "e" modifier in s///e as: "Evaluate the right side as an expression", and I have to wonder whether this kind of evaluation (whatever kind it is) may have enough in common with "string eval" to have a similar effect on source filters and the Switch module. Based on evidence in the thread, it apparently does.

    Thanks for the pointer to the "Apocalypse" pages.

      Still, perlop does describe the "e" modifier in s///e as: "Evaluate the right side as an expression", and I have to wonder whether this kind of evaluation (whatever kind it is) may have enough in common with "string eval" to have a similar effect on source filters and the Switch module. Based on evidence in the thread, it apparently does.

      I think (too!) it merely makes or can make a hell to "parse", the rationale being, in any case, that one can happily use /e without feeling guilty but should do so if tempted to use /ee too.