in reply to Re: How to apply modifiers to a substitution via variable?
in thread How to apply modifiers to a substitution via variable?

Here's the output from ikegami's code above, (but with strict and warnings applied):

Global symbol "%opt" requires explicit package name at test.pl line 16 +. Global symbol "%opt" requires explicit package name at test.pl line 19 +. Execution of test.pl aborted due to compilation errors

Update:  To clarify a bit ... I don't really think that skipping use strict; and use warnings; is "deplorable".  But I also don't think that sometimes using eval or the /e modifier to a regular expression is, either. ;-)


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^3: How to apply modifiers to a substitution via variable?
by ikegami (Patriarch) on Feb 01, 2007 at 00:53 UTC

    I didn't say it was tested code. And it's just a snippet to be inserted into a larger program with use strict and use warnings.

    And I didn't say /e (which is harmless), but /ee. If you're going to execute untrusted code, at least make it obvious. Don't hide it!