in reply to check if its a number
Here's one bad way:
$isanum = !($x !~ y/.//) + $x =~ y/0-9// == $x =~ y/0-9.//c + $x !~ y/ +0-9// + length($x) && $x <= 10; [download]