in reply to Calling and interacting with external executable
If you are calling an interactive program, that would be expected behavior using system or backticks. There is no way to interact with a program through those APIs, so you're program just sits there waiting for input.
You can do a few things. You can pipe your answer to the program (if the program only expects 1 input) like so:
system("echo $input_file_name | $program");
If you're program asks multiple questions, then you will have to be more manual about it. You need to open a pipe to the program and print data to it, like you would a file. See open and the open tutorial
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling and interacting with external executable
by verity (Initiate) on Apr 26, 2012 at 12:16 UTC |