in reply to Re^2: reinterpolation of regexp (and strings?)
in thread reinterpolation of regexp (and strings?)

Are you aware that _any_ string interpolation can inject _any_ arbitrary code in a string? Try this:
perl -le 'print qq(@{[ do{ print q(I got here first); 1 } ]})'
The thing is: there is no safe string interpolation, you you might as well do the //ee thingy. :-)
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^4: reinterpolation of regexp (and strings?)
by ikegami (Patriarch) on Jul 23, 2008 at 18:38 UTC

    Are you aware that _any_ string interpolation can inject _any_ arbitrary code in a string?

    Yes, I know since I said as much in the post to which you replied.

    Are you aware that _any_ string interpolation can inject _any_ arbitrary code in a string?

    Not true. The one provided by String::Interpolate doesn't.

    The native interpolation mechanism does, but we were never talking about that. The OP was proposing a new feature. While I don't see anyone putting in the effort into implementing what is really just another template system, I mentioned that interpolation is not necessarily unsafe, only the current native implementation, and that a safe implementation could be devised.