Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 surveying the Monastery: (7)
As of 2014-11-29 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls