should do the trick.unless ($foo =~ /^\-?\d*\.?\d*$/) { # do something }
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)
In reply to Re: numeric comparison
by Tanalis
in thread numeric comparison
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |