title: calling perl subroutine in shell script
body: <p>i made a Perl Module <code>MyModule.pm</code> it has some subroutines <code>getText</code> which I wanted to call in a shell script.
  i tried following manner but it gives error;</p>
  
  <pre><code>SEC_DIR=`perl -MMyModule -e 'getText'`; # line 1
  echo $SEC_DIR
  exit 0
  </code></pre>
  
  <p>Returned Error;</p>
  
  <pre><code>Can't locate MyModule.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .).
  </code></pre>
  
  <p>BEGIN failed--compilation aborted.</p>
  
  <p>PS: .pm file and .sh are at same location.
  some other options I tried;</p>
  
  <h1>line 1:</h1>
  
  <pre><code>SEC_DIR=`perl -MMyModule -e '&amp;getText'`;
  SEC_DIR=`perl -MMyModule -e 'use MyModule; getText'`;
  SEC_DIR=`perl -e 'use MyModule; getText'`;
  </code></pre>