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

Well of course it buffers, you collect all the output from the remote command into a string and then print it. What else is it going to do ? Try using pipe_out instead.

my ($stdout, $errput) = $ssh->capture2("~/release/$wrapper"); printf "Output: $stdout\n" if $stdout;

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 17:03 UTC
    Yes RichardK, i know that i'm collecting the output in a string and thus, it'll print only after completion. :) I was looking for a way where i could instead print logs at runtime. Thanks for the suggestion! :) I was looking for pipe_out but salva's comment did the trick.