Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm wondering how and if this is possible (I assume it is as this is Perl after all) I'm creating a wxPerl app that will launch an exe. That exe will write it's output to STDOUT and STDERR. Is it possible to create a listener for the STDOUT/STDERR from the exe and update the wxPerl app, or is there an easier solution? Basically the two need to be able to communicate with each other, but just one way (from the exe back to the wxPerl App)

Any advice would be greatly appreciated!

Replies are listed 'Best First'.
Re: WxPerl STDOUT Listener
by pc88mxer (Vicar) on Jun 14, 2008 at 04:50 UTC
Re: WxPerl STDOUT Listener
by starbolin (Hermit) on Jun 14, 2008 at 04:56 UTC

    I don't see where you'ld do anything other than the usual pipe open open fh< "app.exe |". wxPerl is just a graphics Widget that your perl controls.

    s/fh</FH/


    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
      I think the point is not so much to create the pipe as to integrate the "ready to read" condition on the pipe with Wx's event loop. This is a common issue with GUIs.