On Sun, 2017-07-02 at 11:16 -0400, Shawn H Corey wrote:
> On Sun, 2 Jul 2017 14:29:25 +0200
> Eric de Hont <[email protected]> wrote:
>
> > What it boils down to: use warnings as well as -w works, but -w is
> > considered old fashioned.
>
> The problem with -w is that it can't be turned off.
$ perl -le'
use warnings;
my $x;
{ no warnings;
print $x;
}
print $x;
'
Use of uninitialized value $x in print at -e line 7.
$ perl -wle'
my $x;
{ local $^W = 0;
print $x;
}
print $x;
'
Use of uninitialized value $x in print at -e line 6.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/