gmarler has asked for the
wisdom of the Perl Monks concerning the following question:
Given the following scenario:
A Perl script calls an external program. The external program may or may not require input from the user, and output from the external program must appear on the user's terminal as it is emitted.
Normally I would use system() to do this sort of thing, but I would now like to additionally capture the STDOUT and STDERR of the external program in separate scalars within the Perl script.
The module IPC::Run seems to fit this need perfectly, but I'm not sure about the syntax, whether to use ptys or just plain filehandles, etc. I didn't see anything that quite fits my requirements in the documentation for this module. Maybe I missed something...
Searching the newsgroups and this site have yielded nothing either. Any tips?