Wrong usage of map+chomp

tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 10 years ago
parent a9cc531768
commit 9a0d53a805
  1. 3
      lib/Zabbix/Agent/Addons/UPS.pm

@ -11,7 +11,8 @@ sub list_ups {
if ($upsc && -x $upsc){
my @out = qx($upsc -l);
if ($? == 0){
@ups = map { chomp($_) } @out;
@ups = @out;
chomp @ups;
}
}
return @ups;

Loading…
Cancel
Save