in reply to Print log at runtime instead of dumping all at once later

Try setting at the top of your script

$| = 1;

which tells Perl to not buffer the output.

Remember: Ne dederis in spiritu molere illegitimi!

Replies are listed 'Best First'.
Re^2: Print log at runtime instead of dumping all at once later
by Technext (Acolyte) on Jul 02, 2015 at 03:52 UTC

    @1nickt: Thanks. I tried putting

    $| = 1;

    at the top of script but nothing happened. I also tried placing it just before initializing ssh object but it didn't work in any of the cases.

      Right, well as others have said since then, there are other things buffering up your output. Check them off, one by one :-)

      Remember: Ne dederis in spiritu molere illegitimi!