From a9df93142b81012f13bda7006f245e0787f6c779 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 15 Nov 2010 22:57:17 +0100 Subject: [PATCH] bweb: return list for output in send_one_cmd() --- gui/bweb/lib/Bconsole.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/bweb/lib/Bconsole.pm b/gui/bweb/lib/Bconsole.pm index 52fb40de64..3178126039 100644 --- a/gui/bweb/lib/Bconsole.pm +++ b/gui/bweb/lib/Bconsole.pm @@ -199,7 +199,7 @@ sub before sub send_one_cmd { my ($self, $line) = @_; - my $ret=''; + my @ret; my $cmd = $self->{pref}->{bconsole} ; if ($self->{dir}) { $cmd = $cmd . " -D '$self->{dir}'"; @@ -214,11 +214,11 @@ sub send_one_cmd $l = <$OUT>; # line while ($l = <$OUT>) { - $ret .= $l; + push @ret, $l; } close($OUT); waitpid($pid, 0); - return $ret; + return wantarray? @ret : \@ret; } sub send_cmd -- 2.39.5