Here's my take:
die "$var non-numeric" if $var =~ /[^0-9]/; #dies if it starts with - $var =~ s/^0*//; #this will remove any leading zeros
"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
In reply to Re: How to determine if something is numeric?
by kutsu
in thread How to determine if something is numeric?
by mifflin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |