title: Perl: how can I set the version of perl for .pl file in linux
body: <p>I am working on client site and have no access to root, so I can't do anything to the exiting perl version(5.1) installed in <code>usr/bin</code>, but I need to install additional modules for perl, so I installed my own version(5.2) of perl in my own home directory, and did the path setting.</p>
  
  <p>I did check below: </p>
  
  <pre><code>which perl
  </code></pre>
  
  <p>gives me the correct directory.</p>
  
  <p>And</p>
  
  <pre><code>perl -v
  </code></pre>
  
  <p>gives me 5.2.</p>
  
  <p>But when I run a <code>.pl</code> file, the printout says it runs on <code>perl 5.10</code> again.</p>
  
  <p>I have to do perl <code>xxx.pl</code> to run it on <code>perl 5.2</code>, if I just do <code>./xxx.pl</code>, it just runs on <code>perl 5.10</code>,</p>
  
  <p>How can I fix this issue?</p>