Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Warnings

by clintp (Curate)
on Feb 02, 2002 at 16:15 UTC ( #142932=note: print w/ replies, xml ) Need Help??


in reply to Trouble temporarily disabling warnings (was: Warnings)

Another difference is that $^W=0 is temporal (or dynamic) and use warnings is lexical (scope limited).

Setting $^W=0 causes the remainder of the subroutine and any subroutines called thereafter to not throw warnings at runtime. The warnings stay off until you restore $^W.

use warnings works like other lexically scoped pragmas: it only affects things within the block it appears. If you step outside of that block (say, during a subroutine call) the warnings go back to the state they were in before entering the block. When you return to the block, they're back in effect.


Comment on Re: Warnings

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://142932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-08-31 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (351 votes), past polls