in reply to Grabbing STDERROR

Take a look at IPC::Run. I prefer it to IPC::Open3, personally, but that's me. Here's a snippet:
use IPC::Run qw( run ); my($out, $err); my @top = qw( top -b -n1 ); run \@top, \undef, \$out, \$err or die "top returned $?";

Replies are listed 'Best First'.
RE: Re: Grabbing STDERROR
by juanvaldez (Initiate) on Nov 10, 2000 at 21:20 UTC
    I just wanted to thank the people that replied. I had thought of the shell redirect (2>&1) but forgot the syntax. I am not able to install a module because this will be run on few thousand machines but I am deffinetly going to take a look at IPC::Open3. And before I forget the shell redirect did work like a charm!