Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^3: Disable Perl warning

by choroba (Bishop)
on Nov 27, 2012 at 10:37 UTC ( #1005833=note: print w/replies, xml ) Need Help??

in reply to Re^2: Disable Perl warning
in thread Disable Perl warning

The only reasonable way to squelch that pair of warnings is to put "no warnings;" inside reduce's code block
Well, the other reasonable way is to put no warnings 'once'; into the block.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Disable Perl warning
by tobyink (Abbot) on Nov 27, 2012 at 10:53 UTC

    Within the scope of use strict qw(subs vars) the once warning is about a hundred times more annoying than it is useful.

    void and uninitialized are also of questionable value, and although the idea of numeric warnings is good, the details are silly...

    use feature qw(say); use warnings qw(numeric); my $foo = ""; say $foo+1; # why does this warn, my $bar = []; say $bar+1; # when this does not?
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005833]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-05-20 23:51 GMT
Find Nodes?
    Voting Booth?