my @cmds = qw ( cmd1 cmd2 ); my $pid = fork(); defined $pid or die "fork $!\n"; if ( $pid ) { $parent_captures = `$cmds[0] 2>&1`; } else { $kid_captures = `$cmds[1] 2>&1`; }