rastoboy has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering if there is an easy way to execute a shell command and simply capture all of STDERR and STDOUT into a string, potentially without using IPC. I don't need to interact with the process at all, and I find using IPC to be quite awkward/challenging for me. My intuition tells me that there ought to be a simple way to do this, but my knowledge is failing me.
Any input would be greatly appreciated!
Update: Sorry, I meant to say that I wanted to capture STDOUT and STDERR into two separate strings.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Easy way to capture STDOUT and STDERR without IPC
by toolic (Bishop) on Apr 20, 2011 at 16:30 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by kennethk (Abbot) on Apr 20, 2011 at 16:33 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by eff_i_g (Curate) on Apr 20, 2011 at 17:24 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by ikegami (Patriarch) on Apr 20, 2011 at 20:44 UTC | |
by rastoboy (Monk) on Apr 21, 2011 at 18:08 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by johna (Monk) on Apr 20, 2011 at 20:13 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by fidesachates (Monk) on Apr 20, 2011 at 20:27 UTC | |
Re: Easy way to capture STDOUT and STDERR without IPC
by locked_user sundialsvc4 (Abbot) on Apr 20, 2011 at 17:36 UTC | |
by rastoboy (Monk) on Apr 20, 2011 at 19:08 UTC |