nakul has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks
I m i new monk and infact new to perl.
I am using Net::SSH:W32Perl module for running a command on a remote server. The command runs for a few minutes and i want to see the output on stdout as the command runs, not after the command has completed.
The code below helps me see the output only at the end of the command completion.
-------------------
my($stdout,$stderr,$exit) = $ssh->cmd($cmd); print "$stdout\n";
--------------------
Is there any way i could see the output on the fly as the command runs?
Thanks in advance.
- nakul
20071016 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH:Perl output to STDOUT
by liverpole (Monsignor) on Oct 08, 2007 at 13:38 UTC | |
|
Re: Net::SSH:Perl output to STDOUT
by perlofwisdom (Pilgrim) on Oct 08, 2007 at 13:32 UTC |