perlmeditation
tomazos
At the beginning of every Perl script you write put:
<P>
<code>use strict;
use warnings;
use diagnostics;
</code>
<P>
This will among many <em>good things</em> make sure you declare everything in the right namespace, give you extensive warnings about weird things you write (which 9 times out of 10 will be bugs) and when your script encounters an error (compile-time or run-time) it will dump very useful information about what exactly went wrong.
<P>
Do not take these pragmas out when your script goes into production unless you expect your script to be very processor intensive or for it to be called very frequently.
<P>
This is so that the next time you or someone else makes a "small" change to the script, the bugs they have introduced can be caught quickly with the aid of the pragmas (without having to remember to put them back in).
<P>
Yeah, I know. We've heard it before. :) Now you've heard it again.