in reply to Running Entire Bash Script Inside Perl

Create a temporary file, and run that using system, or use pipe open (see perlopentut, perlipc), untested example
open SH, '|/bin/sh --some-switch-sh-understands--important' or die $!; print SH <DATA>; close SH;

Replies are listed 'Best First'.
Re^2: Running Entire Bash Script Inside Perl
by ikegami (Patriarch) on Jun 19, 2009 at 23:38 UTC
    That doesn't address passing an argument to the script.
      You're correct , the 2nd part doesn't, but first part does :)