Name
open2
Synopsis
open2 (\*rdr
, \*wtr
,cmd_with_args
)
Forks a child process to execute the specified command. Takes the following arguments:
\*
rdr
Represents a read filehandle that your program can use to read from the command $cmd’s standard output. Can be a filehandle object or a reference to a typeglob.
\*
wtr
Represents a write filehandle that your program can use to write to the command $cmd’s standard input. Can be a filehandle object or a reference to a typeglob.
cmd_with_args
The command to be executed by the child process and its arguments. Can be specified two ways:
$
cmd_with_args
$cmd
, "arg1
", "arg2
", ...
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.