title: Why should the shebang line always be the first line?
body: <p>I have a simple perl script as below:</p>
  
  <pre><code>#!/usr/bin/perl
  
  use strict;
  use warnings;
  
  print "hello world!\n";
  </code></pre>
  
  <p>I can execute this script as below:</p>
  
  <pre><code>&gt;temp.pl
  hello world!
  &gt;
  </code></pre>
  
  <p>If I add some comments like this:</p>
  
  <pre><code>#this script is just for test
  #the shebang
  #!/usr/bin/perl
  
  use strict;
  use warnings;
  
  print "hello world!\n";
  </code></pre>
  
  <p>and when I try to execute, it gives me output as below:</p>
  
  <pre><code>&gt; temp.pl
  use: Command not found.
  use: Command not found.
  print: Command not found.
  &gt; 
  </code></pre>
  
  <p>The point here is the shebang line should be always at the top, no matter what.
  Can anybody explain why?</p>