[VPM] detecting non-integers

Carl B. Constantine cconstan at csc.UVic.CA
Mon May 5 18:05:46 CDT 2003


I have a web CGI that I'm modifying. I want to make it so that you can
only input an integer number. So if anyone tries to type 10.44, it is
detected by my CGI and refused.

Since perl doesn't have types as such, what is the best way to detect
this, just a regex like: =~/\d+(\.)*/ or is there an easier way?


-- 
Carl B. Constantine         University of Victoria
Programmer Analyst          http://www.csc.uvic.ca
UNIX System Administrator   Victoria, BC, Canada
cconstan at csc.uvic.ca        ELW A220, 721-8753



More information about the Victoria-pm mailing list