I try to always make sure to have the modules strict and warnings in every perl script I make. Of course that means 2 lines of code
1 2 |
use strict; use warnings; |
A nice module to replace these with is ‘strictures’. Basically it sets both strict and warnings, with the added benefit of making all warnings fatal.
1 |
use strictures; |
This way you can no longer write ugly code that only runs with warnings, which I think we all can agree is a good thing.