in reply to reading output from another script
How about
open OTHER, "other |";
You could use fork, so one thread keeps an eye out for data from OTHER, while the other does other stuff, maybe interactive stuff. Once data arrives from OTHER, it is stored in a shared variable, so the main loop can make use of it.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In Section
Seekers of Perl Wisdom