use IPC::Open2; # with named filehandles $pid = open2(\*RDR, \*WTR, $cmd_with_args); $pid = open2(\*RDR, \*WTR, $cmd, "arg1", "arg2", ...); # with object-oriented handles use FileHandle; my($rdr, $wtr) = (FileHandle->new, FileHandle->new); $pid = open2($rdr, $wtr, $cmd_with_args);