Use strict enforces better coding practices. If you add strict and your script dies then you should do your best to change the script so it doesn't die.
Its a good idea to use strict in all scripts...GT do this in all their modules and cgi scripts.
There are only a few examples in which strict can be turned "off" but you should reactivate it straight away again...eg...the following will cause an error with strict:
&{ $var };
That code is basically the same as just writing test(); ....however it is a subref and strict will spew, so you'd need to add:
no strict 'refs';
&{ $var };
...to turn off strict references.
Its a good idea to use strict in all scripts...GT do this in all their modules and cgi scripts.
There are only a few examples in which strict can be turned "off" but you should reactivate it straight away again...eg...the following will cause an error with strict:
Code:
my $var = 'test'; &{ $var };
That code is basically the same as just writing test(); ....however it is a subref and strict will spew, so you'd need to add:
Code:
my $var = 'test'; no strict 'refs';
&{ $var };
...to turn off strict references.