in reply to Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file

I am STILL struggling with this issue. It seems that sometimes, the output is arranged perfectly, and sometimes it's out of order. I've tried turning autoflushing on in just about every buffer from the calling script, and even in the called script (a perl script but this won't always be the case), with mixed, but never consistent, results.

All I want to do is run a comand, and log the STDOUT and STDERR synchronously (in the same order it would appear if the program were run interactively), while encasing lines from STDOUT in some HTML tags.

Is this even possible using open3 and IO::Select or am I tilting at windmills here? _________________________________________________________________________________
Without me, it's just aweso

  • Comment on Re: Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file