From: Mattia B. <mb...@ds...> - 2001-09-21 21:38:56
|
> Hi, Hi > I have a GUI that takes user input and does a system call to another > perl script. This works fine. What I would like to do is to divert > the latter program's standard output and error messages to a > TextCtrl on my GUI . Could anyone give me hints on how to get > started with this? Assuming the latter program is a long running one, you could use IPC::Open3 to spawn the program and get its STDOUT and STDERR, set up a timer, and in the timer function use select RBITS,WBITS,EBITS,TIMEOUT ( see perlfunc ) to see if something is available on STDERR/STDOUT, read and display it. HTH Mattia |