Call perl with backticks for each file (as in `perl -c $filename`;). eval isn't meant as a code checking system--it's for trapping errors and running dynamically-generated code.
Also, be warned that any file with a BEGIN block will still have code executed under -c, so don't run this on any ol' code you find.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Re: Emulating -c within perl
by hardburn
in thread Emulating -c within perl
by ViceRaid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |