Concatenate them something like this:
my $out = ''; my $err = ''; foreach my $one(@cmds) { my ($stdout,$stderr,$exit) = $ssh->cmd($one) ; $out .= $stdout; $err .= $stderr; warn "'$one' has exit value $exit\n" if $exit; } print $out; # all the outputs concatenated print $err; # all the errors concatenated
In reply to Re: how to report error when remote commands fail
by hippo
in thread how to report error when remote commands fail
by janasec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |