On Wed, Apr 3, 2013 at 8:29 PM, Angela Barone
<ang...@italian-getaways.com>wrote:

>         I'm just curious about this.  If you put "no warnings" inside a
> loop, is it good only for that loop, or will it be in effect until the end
> of the script?
>
>
Only for the loop -- warnings, along with most other pragmas (strict,
feature, etc) are lexically scoped, so you can expect the same behavior
there.

Simple test:

use warnings;
my $x = 1 + undef; # This will warn
{
    no warnings;
    my $y = 1 + undef; # This will not warn
}
my $z = 1 + undef; # This will warn

Reply via email to