Greetings,
You could do a regex to check that there aren't any non-digit characters. Just replace your elsif conditional with this:
elsif ($salt !~ /\D/) {
But looking at your example, do you want something a little bit more specific? Do you want only numbers in a particular range?
gryphon
Whitepages.com Development Manager (DSMS)
code('Perl') || die;
In reply to Re: Checking for data types
by gryphon
in thread Checking for data types
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |