in reply to Storing system results in an array
store to results of this action into an array
In addition to the good comments given above, IPC::Run3 is the answer to the literal question that you asked. It's also fairly portable, whereas the techniques in perlipc may not be.
use strict; use IPC::Run3; my (@in, @out, @err); run3( $your_command, \@in, \@out, \@err );
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|