in reply to Re: Re^2: run-time syntax checking
in thread run-time syntax checking

How about
my $string = '}{ print "Bwahaha!\n"; system("rm -rf /")';

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^5: run-time syntax checking
by Pardus (Pilgrim) on Feb 01, 2003 at 16:42 UTC
    Hmmm - I *really* should do development as a non-root user ...

    But say I do pre-parse the string to check for unmatched curlies, I check for BEGIN and END blocks and I strip comments. Is eval "sub { $string }" usefull under these conditions ?

    I don't care for security really -- I trust users to not intentionally fuck up the system.
    --
    Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
    >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<

      And then how about $string = qq[print = "Hey look, a mushroom!  {==" ]? You can't parse Perl. Keep in mind that BEGIN is also spelled "use".


      Seeking Green geeks in Minnesota

        Keep in mind that BEGIN is also spelled "use".

        Or "no".