Home : General : Perl Programming :

General: Perl Programming: Re: [chmod] Using a package: Edit Log

Here is the list of edits for this post
Re: [chmod] Using a package
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:

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.

Last edited by:

Paul: May 7, 2002, 4:29 AM

Edit Log: