From ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 30 Apr 2020 15:56:36 -0700 Subject: probe-mirmon: improve capture usage Signed-off-by: Robin H. Johnson --- probe-mirmon | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/probe-mirmon b/probe-mirmon index cd97274..b0c3413 100755 --- a/probe-mirmon +++ b/probe-mirmon @@ -83,9 +83,8 @@ sub handle_rsync { $file =~ s/\W/_/g; # translate all non-letters to _ # https://stackoverflow.com/a/6331618/1583179 - my $ret; - my ($stdout, $stderr) = capture { - $ret = system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; + my ($stdout, $stderr, $ret) = capture { + system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; }; if ($ret!=0) { #warn "rsync failed, exit code $fail, $! $? $@\n"; -- cgit v1.2.3-65-gdbad