I have stared very hard at the docs for IO::Pty
and I can't dope out how to use it here. No doubt this is in part because I don't understand what is meant by: "the creation of a pseudo tty". (The topic is outside my normal field of Perl endeavors.)
Can you show how IO::Pty could be used to modify the second program in the OP (the program with PIPE1 in it) so that it would process the output from blackbox.pl in real time (leaving blackbox.pl untouched)?
Regarding the "system dependent" issue, I am running Linux 7.3 with the 2.4.20-20.7 kernel. I gather from the docs for IO::Tty that I sould be okay in that respect.