The stupid question is the question not asked | |
PerlMonks |
Re: use strict (upper or lower case)by Abigail-II (Bishop) |
on Aug 16, 2002 at 14:59 UTC ( [id://190662]=note: print w/replies, xml ) | Need Help?? |
That's because of NT's case insentive filesystem. If you do
use Strict, perl goes looking for a file call
Strict.pm. It will find it - because there's
a file stict.pm, and NT can't tell the difference.
Having found that, Perl compiles (and runs) the code in the file, and then goes looking for a sub Strict::import. It doesn't find it, so it continues compiling the rest of the code. However, there's a strict::import, which would have been found, and called, had you used use strict. And that would pull up all the (possible) errors in your code. So, use use strict. It will not only improve your code, but it will also mean your code will not stop compiling at one of the first lines would you ever try to run it on a system where a normal filesystem. Abigail
In Section
Seekers of Perl Wisdom
|
|