Hi PerlMonks,
I have two text files on the "remote" sever, one is 29864 bytes (about 30 K) and the other is 35498 bytes (about 35 K).
And the following code
use strict;
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new('localhost',debug => 1, protocol => '2,1
+');
$ssh->login('username','password');
my ($stdout, $stderr, $exit) = $ssh->cmd('cat /tmp/a 1>&2');
print $stdout . "\n";
print $stderr . "\n";
print $exit . "\n";
Although everything works when the remote program outputs to stdout, when it outputs to stderr, and the output is large, my script hangs. /tmp/a is the smaller file and the script runs to completion. However /tmp/b is the larger file and causes the above to hang. Any information would be helpful. Thank you kind monks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.