title: Getting first line of file as argument of script in Perl
body: <p>So, I need to get out the first line of file, and use its information for some purpose later.
  Also, I need to get the remaining lines from that same file and use information from first line to do something. I tried by the textbook this:</p>
  
  <pre><code>while (defined ($lines = &lt;&gt;))
      {
        #do something
      }
  </code></pre>
  
  <p>How to extract first line from this in Perl?.. I am new in programming, any advice would help.</p>