in reply to numeric comparison
Have a look at Regexp::Common, it has patterns for real numbers (and many other common things).
Just my 2 cents, -gjb-