Syntactic Confectionery Delight | |
PerlMonks |
Re: What is the distinction between IV and NV variables?by derby (Abbot) |
on Sep 06, 2011 at 20:45 UTC ( [id://924462]=note: print w/replies, xml ) | Need Help?? |
Perl tries to do the right thing and if it thinks the integer addition may cause an overflow, it will create the NV slots and use fp arithmetic. You can follow through the perl source (sv.c and/or pp_hot.c) but I believe what you're seeing is perl dropping the string '0' into the case of not causing an overflow and '' into the default possible overflow case.
-derby
In Section
Seekers of Perl Wisdom
|
|