#!perl use IPC::Open2; my $command = 'plink -ssh -pw password_here username_here@host_name_here -batch exit'; print open2(\*CIN, \*COUT, $command); close COUT; my $xs = ; print "the output is :".$xs; close CIN; #### perl test.pl Access denied 3516the output is :