title: Running Perl scripts from a file in linux
body: <p>I'm in Linux (CentOS) trying to run a basic Perl script from a file.  I am getting an error.  I think it has something to do with the syntax, but I can't figure it out.</p>
  
  <pre><code>$ perl -e 'print "Hello World\n";'
  </code></pre>
  
  <p>This runs fine and will print Hello World on the next line.  However, when I put this into vi and save it as perlOne, exactly the same (perl -e 'print "Hello World\n";') and run the command:</p>
  
  <pre><code>$ perl perlOne
  </code></pre>
  
  <p>I get the error: "syntax error at perlOne line 1, near "perl -e   -- Execution of perlOne aborted due to compilation errors." </p>
  
  <p>It's the same line, but it does not work in the file.</p>
  
  <p>I'm working through the Perl tutorial from Linux Pro Magazine - which is where I got this from.</p>