IPC::Open3 works like IPC::Open2.
$pid = open3($wtr, $rdr, $err, $cmd_with_args);
$pid = open3($wtr, $rdr, $err, $cmd, "
The following differences apply:
The first two arguments (
) are passed in
the opposite order.
A third filehandle can be passed, for standard error. If this argument is
, then STDERR and STDOUT for
are on the same filehandle.
, then the leading
stripped from the name and the remainder is assumed to be a regular filehandle
for an open file, rather than a reference to a typeglob.
opens this file as STDIN for
and closes it in the parent. Likewise, if
STDOUT or STDERR directly to that file rather than to the parent.
Copyright © 2001 O'Reilly & Associates. All rights reserved.