$FHLocksemaphore->down; my $pid = open($chldout, "$command |"); $FHLocksemaphore->up; while ( defined ( my $buf = <$chldout> ) ) { $Result[@Result] = $buf; } close($chldout);