Error-trapping left as an exercise for the readeruse strict; use warnings; use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect('server'); $ssh2->auth_password('username','passwd'); my $shell = $ssh2->channel(); $shell->blocking(0); $shell->shell(); print {$shell} "egrep -l $searchStr * 2>&1 | tee ~/myfile.txt\n"; # <$shell> works, but <$hash{$shell_box1}> does not, so my @results = readline($shell);
In reply to Re: Read call in Net::SSH2::Channel
by keszler
in thread Read call in Net::SSH2::Channel
by godsown
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |