in reply to numeric comparison

Why not use a regexp? Something like ...
unless ($foo =~ /^\-?\d*\.?\d*$/) { # do something }
should do the trick.

Hope that helps.

-- Foxcub
#include www.liquidfusion.org.uk

Update: Doh, updated regexp to something that stands a chance in hell of actually working .. (thanks, antirice)

Replies are listed 'Best First'.
Re: Re: numeric comparison
by antirice (Priest) on Jul 15, 2003 at 09:17 UTC

    So "..." and "-124.-8.5-" are valid numbers?

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1