"Mark Cohen" <[EMAIL PROTECTED]> writes: > While the use strict is quite clear to me "Perl pragma to restrict unsafe > contructs" , > the use warnings "Perl pragma to control optional warnings" is not. > What programming risks could I get without the use warnings ?
,----[ perldoc perllexwarn ] | For example, consider the code below: | | use warnings ; | my @a ; | { | no warnings ; | my $b = @a[0] ; | } | my $c = @a[0]; | | The code in the enclosing block has warnings enabled, but the inner | block has them disabled. In this case that means the assignment to the | scalar $c will trip the "Scalar value @a[0] better written as $a[0]" | warning, but the assignment to the scalar $b will not. | ... `---- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>