Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Disable Perl warning

by choroba (Chancellor)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2016-10-01 03:43 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (574 votes). Check out past polls.