At the beginning of every Perl script you write put:
use strict;
use warnings;
use diagnostics;
This will among many good things 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.
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.
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).
Yeah, I know. We've heard it before. :) Now you've heard it again.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.