in reply to capture STDOUT when some jerk opened STDOUT to /dev/tty
Did you try Unix pseudo-terminals, i.e. CPAN IO::Pty?