Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Can you check the syntax of a eval() before executing it?

by Chmrr (Vicar)
on May 06, 2002 at 20:28 UTC ( #164442=note: print w/ replies, xml ) Need Help??


in reply to Re: Can you check the syntax of a eval() before executing it?
in thread Can you check the syntax of a eval() before executing it?

This has been discussed previously here at the monastery, but I can't seem to find where. The general consensus is that it is not possible. The perl -c trick will not prevent code from being executed; see the following, for example:

[chmrr@supox chmrr]$ perl -c BEGIN {print "Nope!"} Nope!- syntax OK

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'


Comment on Re: Re: Can you check the syntax of a eval() before executing it?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://164442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2014-12-27 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls