Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub cmd_pipe { my $cmd = shift; open CMD, "$cmd | " or die "Cannot exec $cmd, $!"; my @data = <CMD>; my $result = close(CMD); return($result, @data); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem capturing the output of external command
by LanX (Saint) on Dec 05, 2008 at 10:00 UTC | |
by Anonymous Monk on Dec 05, 2008 at 11:04 UTC | |
|
Re: Problem capturing the output of external command
by moritz (Cardinal) on Dec 05, 2008 at 09:51 UTC | |
|
Re: Problem capturing the output of external command
by Anonymous Monk on Dec 05, 2008 at 10:17 UTC |