develooper Front page | perl.perl5.porters | Postings from December 2000

useless use of void context work-around

Thread Next
From:
Jeff Pinyan
Date:
December 14, 2000 20:42
Subject:
useless use of void context work-around
Message ID:
Pine.GSO.4.21.0012142337460.4213-100000@crusoe.crusoe.net
                    if (strnEQ(SvPVX(sv), "di", 2) ||
                        strnEQ(SvPVX(sv), "ds", 2) ||
                        strnEQ(SvPVX(sv), "ig", 2))
                            useless = 0;

These 4 lines of code in op.c make

  perl -we '"bite me" while $x'

produce a "useless use" warning, while the code

  perl -we '"did you bite me?" while $x'

and

  perl -we '"ignore that request to be bitten" while $x'

and

  perl -we '"dsico [sic] stu doesn't advertise' while $x'

NOT produce such a warning.

Why is this?

-- 
Jeff "japhy" Pinyan     japhy@pobox.com    http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource  (my id:  PINYAN)       http://search.cpan.org/
PerlMonks - An Online Perl Community          http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc.   http://www.perlarchive.com/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About