or, if the OP happens to use Math::BigFloat:
$ perl -MMath::BigFloat -wE 'say Math::BigFloat->new(5) + "foo"'
NaN
| [reply] [d/l] |
or, if the OP happens to use Math::BigFloat
It's interesting that Math::BigFloat decides it has to numify a non-numeric string to NaN ... when everything else numifies such a string to zero.
Actually, I'm tempted to s/interesting/stupid/, but maybe there's a precedent somewhere that gives some credence to the Math::BigFloat behaviour.
Cheers, Rob
| [reply] |