in reply to Re^2: Can Perl read another terminals STDOUT?
in thread Can Perl read another terminals STDOUT?

I believe it is a bit more complicated than just using @array = <FD>, because it is an ongoing stream until the program exits or closes it's stdout. You probably will need to use a select loop on the filedescriptor, or somehow attach to the output.

If you google for duping stdout linux there are some good links.

If you figure it out, please let us know. You may have to launch your watched program with a tee tapping off the stdout to another filedescriptor, which you can then read. Good luck.

P.S. This is not the best way to solve your problem, only a novel way. Using IPC to run the program, is way easier.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re^3: Can Perl read another terminals STDOUT?