$thread = threads->new(\&Process_Output, $ssh, $proc ); if( $thread ) { @output = $thread->join(); }