If something strange has gone wrong with your program and you're not sure where you should look for help, try the -w switch first. It will often point out exactly where the trouble is.
But wait, there's more...
Perl version 5 is nearly a complete rewrite, and provides the following additional benefits:
BEGIN { require 'perl5db.pl' }
$ENV{'PATH'} = '/bin:/usr/bin'; # or whatever you need $ENV{'SHELL'} = '/bin/sh' if defined $ENV{'SHELL'}; $ENV{'IFS'} = '' if defined $ENV{'IFS'};
"/tmp/perl-e$$" temporary file for -e commands "@INC" locations of perl 5 libraries
See the perldiag manpage for explanations of all Perl's diagnostics.
Compilation errors will tell you the line number of the error, with an indication of the next token or token type that was to be examined. (In the case of a script passed to Perl via -e switches, each -e is counted as one line.)
Setuid scripts have additional constraints that can produce error messages such as "Insecure dependency". See the perlsec manpage .
Did we mention that you should definitely consider using the -w switch?
Perl is at the mercy of your machine's definitions of various operations such as type casting, atof() and sprintf().
If your stdio requires an seek or eof between reads and writes on a particular stream, so does Perl. (This doesn't apply to sysread() and syswrite().)
While none of the built-in data types have any arbitrary size limits (apart from memory size), there are still a few arbitrary limits: a given identifier may not be longer than 255 characters, and no component of your PATH may be longer than 255 if you use -S . A regular expression may not compile to more than 32767 bytes internally.
Perl actually stands for Pathologically Eclectic Rubbish Lister, but don't tell anyone I said that.
The three principle virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why.