if($1 => 1 and $1 <= 75 and /\d{1}-\d{2}/) { ... } #### if ($_ =~ /\something(\d*)somethingelse/i){ if($1 => 1 and $1 <= 75) { ... } }