Jun 262010
Run Perl with useful warnings
Answer:
For good programming habits, it is advised to run Perl using the -w flag so it will print out some useful warnings that might be useful for your program.
E.g.
# perl -e 'print $foo';
The above script shows nothing, but with the -w flag,
# perl -w -e 'print $foo';
Name "main::foo" used only once: possible typo at -e line 1.
Use of uninitialized value $foo in print at -e line 1.
So you can see it is very useful for debugging your program.
In fact, the -w flag is the same as the warnings pragma
use warnings;