if ($str =~ /^(\d+)/ and $1 >= 250 and $1 <= 730) { print "Matched an in range number\n"; }