Feb 23, 2001, 5:41 PM
Post #3 of 5
When you use strict, perl will try to keep you from doing stupid things. So if your script is longer than a page you probably should have a very good reason if you do not turn it on.
The most obvious example of what you get with strict is that if you misspell a variable name, it will not be declared and you will get the error message.
There are good reasons to sometimes not use strict, like if you are doing wizardly things that strict does not like. But in that case you are doing dangerous things, you know you are doing dangerous things, and you are willing to live with the risks. And even then, you can 'use strict' for most of the code and then do a 'no strict' to turn it off where needed.
For more on declaring variables with my, local, use vars, and our look at this post from the past.
Sun Sep 9, 2001 - 1:46:40 GMT, a very special second in the epoch. How will you celebrate?