title: Calling perl script within a bash "while" statement
body: <p>I'd like help with calling a perl script from within the while loop of a bash script. An extract of my script is:    </p>
  
  <pre><code>touch $OUTPUT_DIR/$OUTPUT_XML_PARSE
  
  while read -r LINE; do
     perl newscript.pl "$LINE" &gt;&gt; $OUTPUT_DIR/$OUTPUT_XML_PARSE
  done &lt; $OUTPUT_DIR/$OUTPUT_FILENAME_LIST 
  </code></pre>
  
  <p>The file $OUTPUT_FILENAME_LIST contains a list of filenames each of which the Perl script uses as input argument to open and modify the data and writes the output to $OUTPUT_XML_PARSE.</p>
  
  <p>The error when i run the program is "Can't open perl script "IDOCXML_parse.pl": A file or directory in the path name does not exist.". The perl script is in the same directory as the bash script, so I'm not sure why this is the case. Please advise.</p>