http://www.perlmonks.org?node_id=252964


in reply to eval, but syntax-check only -- like perl -c

UPDATE: on second thought, I can't figure out how you would use B::Deparse intelligently, so don't pay much attention to my post :)

As far as I can tell, as you probably know, only perl can parse Perl. You might have a good shot at trying to use something crazy like B::Deparse (look in the USING B::Deparse AS A MODULE section), but even that's not going to successfully figure out the syntax of "all of perl."

Unless one of the considerably more knowledgable monks corrects me, and I hope they do, you are pretty much stuck with "perl -c" (though I would usually do "perl -wc" :)