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


in reply to Re^2: Incrementing "Infinity" bug (numification, perlnumber, magic increment decrement)
in thread Incrementing "Infinity" bug

It's a bug or at least a design flow.

How do you figure? I think it isn't

So why doesn't Perl do this per default?

You know why, tradition (backwards compatibility ). "barewords" have always been strings

Also style, lowercase constants are unbecoming :p

do we really need to use hacks like 1e9999 to create inf?

We never needed that, use  0+'inf' or  int '-inf' ...

But hey, one of the math modules could export ... or even  use feature 'infinity'; could happen though I don't see the benefit, but what do I know

$ perl -le " for(1..4){ print for \int 'infinity', \int'-infinity' } +" SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64) SCALAR(0x99bc74) SCALAR(0x99bc64)

update: nans, infs, and vomit, How to create nan/inf says bigint/bigrat export inf that stringifies to inf

Also note Re^3: nans, infs, and vomit (underlying c-runtime and strtod, atof)