... my($wtr,$rdr); my $err = gensym; ### $logcmd is a command that returns approx. 460 lines. my $pid = open3($wtr, $rdr, $err, "$logcmd"); my @outlines = <$rdr>; ### if this line is commented out we hang on waitpid waitpid( $pid, 0 ); ...