From 177747c190b34a0a397353ac9f862e2dca70290f Mon Sep 17 00:00:00 2001 From: Flavio Poletti Date: Thu, 11 Sep 2008 21:15:19 +0200 Subject: [PATCH] Added handle to all prints --- deploy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy b/deploy index b9eb908..3f28bdb 100755 --- a/deploy +++ b/deploy @@ -66,7 +66,7 @@ sub operate_on_host { my ($hostname) = @_; my $remote = $config{remote}; - print "*** OPERATING ON $hostname ***\n"; + print {*STDOUT} "*** OPERATING ON $hostname ***\n"; if ($config{prompt}) { my $choice = lc(prompt "$hostname - continue? (Yes | Skip | No) ", -while => qr/\A[nsy]\z/mxs); @@ -83,9 +83,9 @@ sub operate_on_host { # Execute file my $ssh = get_ssh($hostname); $|++; - print "$remote "; + print {*STDOUT} "$remote "; my ($out, $err, $exit) = $ssh->cmd($remote); - print "exit = $exit\n"; + print {*STDOUT} "exit = $exit\n"; if ($config{stdout} && defined $out) { print {*STDOUT} $out; @@ -99,7 +99,7 @@ sub operate_on_host { next unless defined $val; $val =~ s{\s+\z}{}mxs; $val =~ s{^}{$type }gmxs; - print $val, "\n\n"; + print {*STDOUT} $val, "\n\n"; } ## end for ([STDOUT => $out], ... } -- 2.11.4.GIT