I think you want piped open:
open my $fh, "| ./setup.sh" or die $!; # print $fh "$_\n" for qw(a b c ...);
When you then say print $fh ..., the shell script gets the data on stdin, as it would from your current heredoc.
In reply to Re: Running shell script which needs runtime input through perl
by Eliya
in thread Running shell script which needs runtime input through perl
by snreddy_gopu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |