http://www.perlmonks.org?node_id=481471


in reply to Re^2: How to Ask a Question (With Test::More) (repost, now with Sitedocclan approval.)
in thread How to Ask a Question (With Test::More)

Quite frankly, I think that in most instances, it is simple better to allow Perl to detect these kind of trivial errors, It most times does a better job of reporting the nature of the problem than the programmer will:

#! perl -slw use strict; sub times7 { return $_[ 0 ] * 7; } print "times7( $_ ) returned:", times7( $_ ) for 1, 2, 3, 0, undef, 'f +red'; __END__ P:\test>junk times7( 1 ) returned:7 times7( 2 ) returned:14 times7( 3 ) returned:21 times7( 0 ) returned:0 Use of uninitialized value in concatenation (.) or string at P:\test\j +unk.pl line 8. Use of uninitialized value in multiplication (*) at P:\test\junk.pl li +ne 5. times7( ) returned:0 Argument "fred" isn't numeric in multiplication (*) at P:\test\junk.pl + line 5. times7( fred ) returned:0


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.