Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Checking for data typesby gryphon (Abbot) |
on Sep 29, 2005 at 15:10 UTC ( [id://496134]=note: print w/replies, xml ) | Need Help?? |
Greetings, You could do a regex to check that there aren't any non-digit characters. Just replace your elsif conditional with this:
But looking at your example, do you want something a little bit more specific? Do you want only numbers in a particular range? gryphon
In Section
Seekers of Perl Wisdom
|
|