develooper Front page | perl.beginners | Postings from February 2002

Re: use strict

Thread Previous | Thread Next
Dave Benware
February 5, 2002 11:59
Re: use strict
Message ID:
Octavian Rasnita wrote:
> Hello all,
> I am a new member. please tell me what is used for the following line in a
> script:
> use strict;
> I saw that if I use it, this make sometimes my scripts to have errors and
> without it, they works.
> Thanks!
> Teddy,
> My dear email address is

As Jason and Frank pointed out, use strict means your Perl code is
no longer a "loosely written language", :~(  and therefore, some common,
(dumb/silly/stupid mistakes), can be avoided.

However, in order to use strict, one must learn scoping which is not
a one-hour-done-and-over-with type of thing, heh.  I know cuz I am
presently trying to learn it after a year of ignoring it.

If you're writing small scripts or just installing other peoples'
scripts and that's as far as you expect to go with Perl, you could
do without it, *IMHO*.

Otherwise, it would be best to dig into it as soon as possible,
develop the habit, make it a natural thing.

Here's a few places where I've begun:


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About