From: Barrie Slaymaker Date: Thu, 26 Apr 2001 12:01:10 +0000 (-0400) Subject: Re: [PATCH perldiag.pod] Re: [PATCH] Re: Useless use of constants other than 0,1... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65191a1eeddc40c842b08b03bcc6e98666def342;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH perldiag.pod] Re: [PATCH] Re: Useless use of constants other than 0,1 in void context? Message-ID: <20010426120110.E29698@jester.slaysys.com> p4raw-id: //depot/perl@9857 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 524c2bd..6f7ed5f 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3684,6 +3684,14 @@ a scalar context, the comma is treated like C's comma operator, which throws away the left argument, which is not what you want. See L for more on this. +This warning will not be issued for numerical constants equal to 0 or 1 +since they are often used in statements like + + 1 while sub_with_side_effects() ; + +String constants that would normally evaluate to 0 or 1 are warned +about. + =item Useless use of "re" pragma (W) You did C without any arguments. That isn't very useful.