http://www.perlmonks.org?node_id=924462


in reply to What is the distinction between IV and NV variables?

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
  • Comment on Re: What is the distinction between IV and NV variables?