in reply to redirecting stdin on windows
However, I use stdout and stderr in GUI programs all the time, for debugging/logging. It's harmless and does nothing unless the program was started with redirected output. I think stdin is the same way: if you have a GUI program and don't supply a file handle when it's started (i.e. "redirect" it), it is connected to nothing. A Console program, on the other hand, will create a new console the first time it is needed, it it wasn't hooked up to anything (because it was launched by a GUI process or with flags telling it not to).
Hmm, on rereading, I think you don't need any of that. You are asking about ordinary command-line programs, right? Your problem is that | won't give you both input and output at the same time?
In that case, see the module IPC::Open2. It does exactly this.
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: redirecting stdin on windows
by arkamedis21 (Acolyte) on Aug 20, 2002 at 18:56 UTC | |
by John M. Dlugosz (Monsignor) on Aug 20, 2002 at 21:51 UTC |