You might want to take at a few of the IPC:: modules like IPC::Open3 (alt.) and IPC::Run (alt.), but an alternative on platforms that support descriptor redirection is something like ...
# adapted from the Perl Cookbook, 16.9 @all = `( cmd | perl -pe "s/^/stdout: /" ) 2>&1`; for (@all) { push @{ s/stdout: // ? \@out : \@err }, $_ }
--k.
In reply to Re: Modules to handle backticks?
by Kanji
in thread Modules to handle backticks?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |