Perl.Org wrote:
I have to work with this version of Perl:
This is perl, version 5.005_03 built for MSWin32-x86
When I 'use warnings' it says:
Can't locate warnings.pm in @INC
Right, the warnings pragma was introduced with version 5.6.0.
How do I enable warnings in this case? I think there is a -w on
the shebang line,
Then it is enabled anyway.
but I am trying to enable warnings from my modules and I am on
Windows which may tend to ignore such conveniences anyway.
Even if Windows typically doesn't care about the path to perl on the
shebang line, possible switches in the shebang line should still make
a difference.
But if you want to ensure that warnings is enabled, the equivalent of
using the -w switch is to give the $^W variable a true value. Note
that unlike "use warnings;", this enables warnings dynamically, not
lexically.
HTH
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>