$input = if ($input =~ /[0-9]/) { print "input was a single digit number\n"; } else { print "input wasn't a single digit number\n"; }