rkrasowski has asked for the wisdom of the Perl Monks concerning the following question:
Here is the dialog.pl program that I am trying to interact with:# open my $READ, "-|", "./dialog.pl"; while (<$READ>) { print $_; } close $READ;
The way I understand first program will open dialog.pl program and display "How old are you?" in the terminal,but it is not the case. What is the issue here? I would like to catch output from dialog.pl , and respond to it. I also understand that I will have to fork the program to be able to do writing and reading from dialog.pl at the same time. Thanks like always. Robertprint "How old are you? "; my $age = <>; print "You are $age.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Controlling input and output of different program
by jeffa (Bishop) on Mar 30, 2015 at 22:44 UTC | |
by rkrasowski (Sexton) on Mar 31, 2015 at 02:16 UTC | |
|
Re: Controlling input and output of different program
by Anonymous Monk on Mar 30, 2015 at 22:33 UTC |