If you want to check the syntax of a perl file without running it, use the -c command line switch

perl -c foo.pl

Advertisements