#!/usr/bin/perl use strict; use warnings; use IPC::Open3; my $input; my $pid = open3( $input, \*OUT, \*ERROR, "./foo.pl" ); my $rc = $?; print "Rc=$rc\n"; ...