title: Running a program that requires a password on the command line from a Perl script
body: <p>I have written a Perl wrapper around a shell script. I am using IPC::Run::Simple to execute system commands.  As an example: </p>
  
  <pre><code>run ("mkdir ~$usr/12.2.0_cp/faiz_cpv/$pdate") or die "Error $ERR";
  run ("cp ~$usr/12.2.0_cp/faiz_cpv/MPlist.lst ~$usr/12.2.0_cp/faiz_cpv/$pdate") || die "Error: $ERR";
  run ("cd ~$usr/12.2.0_cp/faiz_cpv/$pdate; sh /opsutils/mfg_top/rel/CPV/bin/list_generation.sh . MPlist.lst mfg_relall_us\@oracle.com") or die "error $ERR";
  .
  .
  </code></pre>
  
  <p>One of these shell scripts requires the user of the script to enter their password. That is, a message is printed on stdout and the password is accepted via the shell. A number of calls are made to this shell script during the entire process which means a user must reenter his password a number of times. </p>
  
  <p>Is there a way by which I can request user for the password at the command line itself, and pass that password implicitly instead of prompting user for the password again and again?</p>