Perl can be quite helpful in spotting suspicious code and letting you know about it. Most of the debugging skills you may have learned from other languages are just as applicable to Perl. When your program spits out pages and pages of warnings, start with the first ones.
There are several ways to enable warnings. Old-style Perl uses the
-w switch on the command line:
You can also use command-line switches on the shebang line inside the program:
Modern Perl uses the
warnings pragma inside the code (Item 99).
The trick ...