Safety net



#!/usr/bin/perl
use strict;
use warnings;

You should always use them as they are a safety net helping reduce mistakes.

It is usually very hard to add this safety net after you already have some code.

If the warnings you get don't make sense add


use diagnostics;

line and you will get more verbose warnings.

Why are use warnings and use strict so important even in small (< 100 lines) scripts ?