diff --git a/lib/Zabbix/Agent/Addons/UPS.pm b/lib/Zabbix/Agent/Addons/UPS.pm index 721fc80..bdfb2e3 100644 --- a/lib/Zabbix/Agent/Addons/UPS.pm +++ b/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;