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


in reply to Re^3: is_numeric
in thread is_numeric

It used to use strtod, but doesn't any more. The C99 standard pulled the rug out from under everyone by changing e.g. "0x10" from being 0 (in C89) to being 16.

Replies are listed 'Best First'.
Re^5: is_numeric
by Fletch (Bishop) on Apr 12, 2007 at 18:40 UTC

    Ooop, you're quite right. Perhaps perldata shouldn't mention strtod as a way to check for numerical-ness then. Of course if you're getting hex numbers as strings you're going to need to convert them (through POSIX::strtod or hex) anyhow before they're interpreted as the correct value so maybe it's kind of a corner case.

    Good point though.