|Welcome to the Monastery|
Trouble temporarily disabling warnings (was: Warnings)by vek (Prior)
|on Feb 02, 2002 at 14:10 UTC||Need Help??|
vek has asked for the
wisdom of the Perl Monks concerning the following question:
Esteemed monks. I'm sure I'm missing something very simple here...
Just had to modify some code written by a co-worker. Usually I use -w to turn-on warnings in my code. The co-worker had opted for use warnings; instead.
A warning is generated from a tiny subroutine that I needed to temporarily disable. Now usually in my code I would do local $^W = 0; et voila - no warnings. A quick perusal of the doc led me to believe that I could say no warnings; and that would also temporarily turn off warnings. Didn't work.
Did I miss something from RTFM? Should no warnings; just before the offending code temporarily disable warnings a-la local $^W = 0;?
2002-03-31 Edit by the node bunny : Changed title from "Warnings"