title: Perl one-liner: how to skip to the next file in @ARGV
body: <p>I was thinking about how to "short circuit" reading a file within a <code>perl -ne</code> loop. If I hit some condition, I want to abandon the current file and proceed to the next one in @ARGV. This would be similar to GNU awk's  handy <a href="https://www.gnu.org/software/gawk/manual/html_node/Nextfile-Statement.html" rel="noreferrer"><code>nextfile</code></a> command.</p>
  
  <p>Something like this:</p>
  
  <pre><code>perl -ne 'do_something(); next_file if some_condition()' files ...
  </code></pre>
  
  <p>Playing around, I found that <code>close ARGV</code> achieves the "go to next file" goal.</p>
  
  <p>Are there other, less magical, ways to accomplish this?</p>