in reply to vallidating a regular expression

print "the number is less than 10\n" if $totalNumber =~ m/(\d+)/ && length($1) == 2 && $1 <= 10;