Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Disable Perl warning

by choroba (Abbot)
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.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: Disable Perl warning
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005833]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-10-25 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls