"Selector, Lev Y" <[EMAIL PROTECTED]> writes:

> Folks,
> 
> It was long time - no messages (on this list).
> Is everybody OK?
> I am working in downtown New York City -
> and still can smell burning outside the building:
> 
>    http://www.spaceimaging.com/ikonos/wtc0915_1280.jpg
> 
> I have a (simple) Perl question.
> Is there a standard function in perl which can tell me 
> if a string represents a valid number?
> (including integer, with decimal point and scientific notaion with "e").

    #!/usr/bin/perl6

    sub is_number ($number) { return +$number eq 'NaN' }

Shame we haven't actually *got* Perl 6 yet.

-- 
Piers

Reply via email to