title: How to execute perl file from shell script
body: <p>I have a question about how to execute the perl file inside of a shell script</p>
  
  <p>I have 2 files now, "test.sh" and "test.pl", here are example of my scripts</p>
  
  <p>SHELL script</p>
  
  <pre><code>#!/bin/bash
  perl FILEPATH/test.pl
  ......
  </code></pre>
  
  <p>PERL script</p>
  
  <pre><code>#!/usr/bin/perl
  my $a = "hello"
  sub saysomething
  {
      print $a;
  }
  .....
  </code></pre>
  
  <p>The way I call the shell script is : under the path of shell scripts, execute "./test.sh"</p>
  
  <p>All mentioned above are working under the environment 
  GUN bash, version 4.2.24(1)-release (i686-pc-linux-gnu) + perl (v5.14.2)</p>
  
  <p>But if I put those scripts on server (which I couldn't change the bash / perl version)
  GNU bash, version 4.2.10(1)-release (x86_64-pc-linux-gnu) + perl (v5.12.4), I got the followign message:</p>
  
  <p>FILEPATH/test.pl: line 2: my: command not found</p>
  
  <p>Does anybody know how can I solve this problem?</p>
  
  <p>BTW, if I execute the perl script individually (perl FILEPATH/FILENAME.pl), it works perfectly.</p>