in reply to Filtering my own stderr

Another thing yo could try, is doing some pipe magic: open a pipe, reopen STDERR to the write end of the pipe and have your filter read from the read end:
pipe (STDERR_READER, STDERR_WRITER) or die "Pipes clogged: $!\n"; close STDERR; open STDERR, ">&STDERR_WRITER" or die "Could not dup STDERR: $!\n"; sub my_output_filter { my $line=<STDERR_READER>; do_something_funny_and_possibly_even_useful; }

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: Filtering my own stderr
by ruscoekm (Monk) on Nov 02, 2002 at 13:55 UTC