in reply to Easy way to capture STDOUT and STDERR without IPC

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.

That question makes no sense. "IPC" stands for "Inter-process communication". What do you think you're doing when you're getting data from your child's STDOUT?

Maybe you're trying to avoid select? Now that's achievable. Just like backticks lets someone else handle the IPC, there are modules that do that for more complicated cases.

use IPC::Run3 qw( run3 ); run3( \@cmd, undef, \(my $out), \(my $err) );

IPC::Run3

Replies are listed 'Best First'.
Re^2: Easy way to capture STDOUT and STDERR without IPC
by rastoboy (Monk) on Apr 21, 2011 at 18:08 UTC
    You are awesome! IPC::Run3 is just what I needed--easy peasy. Thanks!