use feature qw( say ); use IPC::Open3 qw( open3 ); open(local *TO_CHLD, '<', '/dev/null') or die $!; my $pid = open3( 'STDERR', 'perl', '-E', 'sleep 2; say $$;' ); say time, ": ", $pid; while () { print time, ": Perl said: $_"; } waitpid($pid, 0);