Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Re: Migrating scripts back to Perl 5.005_03by ajdelore (Pilgrim) |
on Sep 05, 2003 at 22:50 UTC ( [id://289381]=note: print w/replies, xml ) | Need Help?? |
If I understand perllexwarn, which I am not sure that I do, -w does set $^W globally. (And -W makes it irrevocable). Of course, you can't use the shebang in a module. While in 5.6+ you could put use warnings; in a module and have it scoped to that file only, I think that setting $^W would be global unless enclosed in a block, or unless it was somehow contained.
In the above example, both print statements throw a warning. However, if I do:
Then I only get one in the module. Of course, the main thing that perllexwarn seems to say is "don't do any of this stuff." It seems better to take warnings as an all-or-nothing deal in 5.005. </ajdelore>
In Section
Meditations
|
|