in reply to Re: assign open2 output to variable
in thread assign open2 output to variable
my $command = 'link -ssh -pw password_here user_name@host -batch'; $pid= open3(\*CIN, \*COUT, \*COUT, $command); print CIN "ls\n"; print CIN "exit\n"; close CIN; my @xs = <COUT>; foreach $x(@xs) { print "\noutput:".$x."\n"; } close COUT; waitpid( $pid, 0 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: assign open2 output to variable
by ikegami (Patriarch) on Mar 31, 2014 at 16:05 UTC |