I'm not sure I follow what you are trying to do in the big picture here so I have to ask if you have read the documentation for open. There is a section specifically dealing with redirecting STDOUT and STDERR. However, if after that review you still need some additional performance then you should investigate a really cool module from tobyink++ called IO::Callback that may fit your requirements.
Here is a Synopsis from him
In reply to Re: Syncing perltie filehandle STDOUT STDERR and system call
by jandrew
in thread Syncing perltie filehandle STDOUT STDERR and system call
by karthikm897
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |