in reply to Re: Not a Number
in thread Not a Number

It may be a little late now but here's a funky little subroutine from merlyn that distinguishes between numbers and strings
sub is_numeric { ($_[0] & ~ $_[0]) eq "0"; }
The original post can be found here.


Replies are listed 'Best First'.
Re: Re: Re: Not a Number
by rasta (Hermit) on Oct 18, 2002 at 15:24 UTC
    OK, what will your subroutine return for '1e+2'?..
    perltod() works fine.