From c3ee93d817f74ed18b87c95c2dc8638d58e48f0e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 8 Jul 2015 20:03:18 +0200 Subject: [PATCH] Fix using keys on hash --- zabbix_scripts/disco_sensors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix_scripts/disco_sensors b/zabbix_scripts/disco_sensors index 50cd3b2..411fafe 100644 --- a/zabbix_scripts/disco_sensors +++ b/zabbix_scripts/disco_sensors @@ -18,7 +18,7 @@ my $json; my $cfg = new Config::Simple; $cfg->read('/etc/zabbix/sensors.ini'); my %sensors = (); -foreach my $k (keys $cfg->vars){ +foreach my $k (keys %{$cfg->vars}){ $k =~ s/\..*$//; $sensors{$k} = 1 unless $sensors{$k}; }