The simplest answer to this question is that by putting a "use strict;" at the top of your Perl application, you're telling the interpreter to be strict about a lot of different things, primarily to do with variable names. If you don't declare a variable (using my $variable) the interpreter won't allow you to use it.
You may think to yourself:
"Why would I want to make it hard on myself?"
The first time you save yourself loads of debugging time by having the program exit on you because you used foreach (@items) instead of foreach (@item), it will all become clear. Typos will become immediately evident. "use strict" is such an important part of good Perl programming practice that if it weren't for the ease with which one-liners can be done without it, it would probably be a default by now. ;)
-Ernie
On Apr 30, 2004, at 10:19 AM, yop = me wrote:
Hi
Perl and i knows us about 4 years. But i am a graphic designer that learn it by my own. i haven seen many scripts (not wroted by me), that have the line use strict; in the top, and one time i read a post that teels me about it.
could some one aout there tell me why use this module? but if you can, please remember that i am a graphic designer using Perl, and dont have study it in school ore somthing similar. so please if you have the patience to explain it, use apples and pears to tell me.
thanks in advance.
yop _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
