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