Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Running shell script which needs runtime input through perl

by Eliya (Vicar)
on Feb 02, 2012 at 15:01 UTC ( #951455=note: print w/ replies, xml ) Need Help??


in reply to Running shell script which needs runtime input through perl

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.


Comment on Re: Running shell script which needs runtime input through perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-11-23 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (130 votes), past polls