strict puts an environment on your script that requires you to declare all of your variables. You can do this by either

A - Declaring them with my ($variable); or local ($variable). The difference is that my will keep the variable to just that subroutine, while local will make it availble to any other subroutine called during the proccess of the subroutine it's declared in.

B - If you need your variable to be global, at the top the script you can insert use vars qw($variable1 $variable2);. You can also put arrays and hashs in this. In scripts that I use that have a parser, i declare the entire hash that the input gets stored in as global, which is simpler than doing this use vars qw($input{'name'} $input{'email'} $input{'icq'} ...);. And because there is qw before the (), you don't have to include any commas between the variables.

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?