in reply to perl code to automate launching a program and entering responses

Assuming you are on some UNIX like system. You don't really need any CPAN modules. You can do everything "the hard way". Create 2 pipes, do fork, reopen STDOUT and STDIN of the child into appropriate pipe ends, then execute your program. Now the parent will see both STDOUT and STDIN of your program. Of course, you have to make sure, that the program does not buffer its responses, so that perl script can see them. And make sure the perl script also avoids buffering.

Read 'perldoc perlipc' to find details and easier alternatives.

  • Comment on Re: perl code to automate launching a program and entering responses