title: Perl one-liner prints everything except the last line
body: <p>I have a file. I want to print all the lines except the last one. How can we do this with a Perl one-liner?</p>
  
  <p>This is not working:</p>
  
  <pre><code>cat file|perl -lane 'print if not eof()'
  </code></pre>
  
  <hr/>
  
  <p>My bad, this is working. I didn't look at my output closely.</p>
  
  <pre><code>seq 1 6 | perl -lane 'print if not eof()'
  1
  2
  3
  4
  5
  </code></pre>