Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^6: how to check syntax of code inside a scalar?

by snoopy (Deacon)
on Aug 05, 2010 at 05:05 UTC ( #853027=note: print w/replies, xml ) Need Help??


in reply to Re^5: how to check syntax of code inside a scalar?
in thread how to check syntax of code inside a scalar?

I't wouldn't do the compile step, but because this happens early, it would pretty well bypass any syntax checking whatsoever:
perl -c -e 'BEGIN{exit}; BEGIN{print "yay\n"};@&$^^#@!.' -e syntax OK

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://853027]
help
Chatterbox?
[Eily]: for what it's worth I didn't go for the brightest solution either
[Eily]: I tried print eval '2+1/3*(2+2/5))' or print $@
[Eily]: and therefore concluded that the eval did succeed because there was no printed error :P
[Eily]: stupid operator precedence :D

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-10-24 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (287 votes). Check out past polls.

    Notices?