title: Embedded Perl script in Linux shell
body: <p>Can I invoke Perl script from Unix shell? For example I have bash script in form like:</p>
  
  <pre><code>#!/bin/sh
  echo This is bash
  
  i=12
  echo $i
  
  perl &lt;&lt;__HERE__
  print "This is perl\n";
  my \$i = $i;
  print ++\$i . "\n";
  
  
  echo This is bash again
  echo $i
  </code></pre>
  
  <p>Above is just an example.</p>
  
  <p>Is it possible to pass variables from bash to script? Hope I expressed myself correctly and properly. I need to call Perl script which will take values from bash script and use them and then return processed results.</p>