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