title: Skipping lines based on multiple listed criteria
body: <p>I'm iterating over a file <code>&lt;$IN&gt;</code>, processing it line by line. There are some lines I wish to skip based on the values held within their split fields, which I currently accomplish via:</p>
  
  <pre><code>while (&lt;$IN&gt;) {
      chomp $_;
      my(@F) = split("\t", $_);
      next if ($F[0] == 1 &amp;&amp; $F[1] &gt; 20 &amp;&amp; $F[1] &lt; 40);
  </code></pre>
  
  <p>However I have multiple such lines and criteria to check against. I'd much rather load in a .txt file containing the test values i.e.:</p>
  
  <pre><code>1   20  40
  1   63  68
  2   1   10
  2   12  18
  3   3   9
  </code></pre>
  
  <p>And find a shorter way of testing any given line against these ranges without the need for many lines as I currently have:</p>
  
  <pre><code>next if ($F[0] == 1 &amp;&amp; $F[1] &gt; 20 &amp;&amp; $F[1] &lt; 40);
  next if ($F[0] == 1 &amp;&amp; $F[1] &gt; 63 &amp;&amp; $F[1] &lt; 68);
  next if ($F[0] == 2 &amp;&amp; $F[1] &gt; 1 &amp;&amp; $F[1] &lt; 10);
  next if ($F[0] == 2 &amp;&amp; $F[1] &gt; 12 &amp;&amp; $F[1] &lt; 18);
  next if ($F[0] == 3 &amp;&amp; $F[1] &gt; 3 &amp;&amp; $F[1] &lt; 9);
  </code></pre>
  
  <p>Could anybody provide an example of how to do this in a more succinct manner?</p>