Update in perlop

[email protected] ("Balasundaram, Prateek") Wed, 4 Sep 2013 12:19:17 +0000
Newsgroups perl.perlfaq.workers
Message-ID <[email protected]>
Hello all,

In the section: http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto=
-decrement

I believe this line is incorrect:
"undef is always treated as numeric, and in particular is changed to 0 befo=
re incrementing (so that a post-increment of an undef value will return 0 r=
ather than undef)."

Upon testing:
$ perl -le '$val=3Dundef;print("Initial Value: $val");$val++;print("Increme=
nted Value: $val");'
Initial Value:
Incremented Value: 1

It seems that the post-increment value of undef will be 1, not 0 as the doc=
umentation states.

Regards,
Prateek
--
Prateek Balasundaram
[email protected]
(484)562-1281



________________________________

IMPORTANT: The information contained in this email and/or its attachments i=
s confidential. If you are not the intended recipient, please notify the se=
nder immediately by reply and immediately delete this message and all its a=
ttachments. Any review, use, reproduction, disclosure or dissemination of t=
his message or any attachment by an unintended recipient is strictly prohib=
ited. Neither this message nor any attachment is intended as or should be c=
onstrued as an offer, solicitation or recommendation to buy or sell any sec=
urity or other financial instrument. Neither the sender, his or her employe=
r nor any of their respective affiliates makes any warranties as to the com=
pleteness or accuracy of any of the information contained herein or that th=
is message or any of its attachments is free of viruses.