or download this
if (/\D/) { print "has nondigits\n" }
if (/^\d+$/) { print "is a whole number\n" }
...
if (/^-?(?:\d+(?:\.\d*)?|\.\d+)$/) { print "is a decimal number\n"
+ }
if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/)
{ print "a C float\n" }