my $STDOUT = IO::Handle->new; my $STDERR = IO::Handle->new; open($STDOUT, ">&STDOUT") || croak( 'Cannot duplicate STDOUT to file handle - ', $! ); open($STDERR, ">&STDERR") || croak( 'Cannot duplicate STDERR to file handle - ', $! ); $STDOUT->autoflush; $STDERR->autoflush;
If you still have no joy with this, you may have to incorporate a flush of the respective buffer prior to reading from it. eg. $STDOUT->flush. This may be necessary if some_application is actively buffering its output.
I'd be very interested to hear how you go with this and see if this resolves your problems with your specific application.
In reply to Re: Re: Re: Pipe, fork, exec and red-hot pokers.
by rob_au
in thread Pipe, fork, exec and red-hot pokers.
by hagus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |