: : handwaving : my $pid=fork(); if ( $pid == 0 } { : child process goes here } elsif { $pid > 0 ) { : parent process wait(); # Wait for the child to exit } else { # WOAH! We should never get here! die "fork returned $pid"; } #### : child open(PIPE,"some_command 2>&1 |") or die $!; my @output=; close PIPE; print @output;