in reply to perldoc of s///ee wrong or just misleading?

SubstitutionExpression evaluated for each matchIf the operator was implemented as a function
s/pat/repl/qq/repl/subst($_, qr/pat/, sub { qq/repl/ })
s/pat/repl/ereplsubst($_, qr/pat/, sub { repl })
s/pat/repl/eeeval(repl)subst($_, qr/pat/, sub { eval(repl) })

In both of the last two cases, repl is evaluated as a scalar expression and its result is expected to be a string.

The docs are incorrect or confusing.

Replies are listed 'Best First'.
Re^2: perldoc of s///ee wrong or just misleading?
by LanX (Saint) on Dec 30, 2014 at 02:58 UTC
    > repl is evaluated as a scalar expression

    Not sure, do you mean string eval?

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

      I don't understand the question — neither the whole nor any part of what I said can be replaced by "string eval" and still make sense — but I did say what I meant to say.