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

useless use of void context work-around

Thread Next
Jeff Pinyan
December 14, 2000 20:42
useless use of void context work-around
Message ID:
                    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'


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


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

NOT produce such a warning.

Why is this?

Jeff "japhy" Pinyan
CPAN - #1 Perl Resource  (my id:  PINYAN)
PerlMonks - An Online Perl Community
The Perl Archive - Articles, Forums, etc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About