in reply to Re: Best way to communicate with a shell like process?
in thread Best way to communicate with a shell like process?

Yes - that is what the IPC::Open's do.

Basically, they start the process (server in your case), then redirect the STDIN and STDOUT such that they go through your perl script. You get full control of content in and out.

It is not clear from your post whether the "server" script is started separately. The IPC::Opens require that the perl script start the "server" program.

Also, you use the therm "console" loosely. Most likely, you are referring the the STDIN, STDOUT and STDERR of the "server" script. Please use this terminology for future posting. The "Console" referrs to the window (or terminal) in which the script runs. Hence, you can REDIRECT the STDOUT to the console, and receive STDIN from the console, but they are not to be confused with the console itself.

  • Comment on Re: Re: Best way to communicate with a shell like process?