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