in reply to Re: Substituting literal strings for escape characters
in thread Substituting literal strings for escape characters

Just for fun, try that with:
my $x = '";warn q[this is code!] for 1..20;"';
:-)

Hint: Don't use eval() carelessly... your version allows arbitrary code to be placed in the input string, which will get executed

Replies are listed 'Best First'.
Re: Re: Re: Substituting literal strings for escape characters
by steves (Curate) on Feb 18, 2003 at 19:59 UTC

    Good point. I don't typically use eval on data that comes in externally -- only on data my program controls.