in reply to How to run a shell script from a Perl program?
If you want the PID, STDOUT, and STDERR, use IPC::Open3.
Example:
use IPC::Open3; local (*IN, *OUT, *ERR); my $pid = eval{ open3( \*IN, \*OUT, \*ERR, 'my_command', 'my_command_args' ); }; if ($@) { warn ($@); } ## capture your output, if needed... ## wait on the pid... wait( $pid, 0 );
|
---|
In Section
Seekers of Perl Wisdom