in reply to Re^3: Executing command from perl script with input/output
in thread Executing command from perl script with input/output
Thanks four your reply. After adding your changes to my script, I noticed that READ and ERROR do not have any data at all. This is weird because soon after I execute the binary (from a command line) it prompts with a list of choices to choose from. My suspicion is that the binary only sends out data if its STDOUT is connected to a terminal. I am not sure if open3 provides any connection to a terminal..
I tried the write at the beginning of the program (as above) but neither of $answer or $error was populated.
The pipe method you mention is what I've been using until now. I wanted to add more error checking by examining the choices the program gives the user before writing data back to its STDIN.
Thanks for your time!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Executing command from perl script with input/output
by zentara (Cardinal) on Aug 10, 2005 at 11:30 UTC | |
by linuxfan (Beadle) on Aug 10, 2005 at 18:26 UTC | |
by zentara (Cardinal) on Aug 11, 2005 at 10:27 UTC | |
by linuxfan (Beadle) on Aug 12, 2005 at 21:15 UTC |