diff --git a/lib/nfss.pm b/lib/nfss.pm index 0f6dd37..ab54272 100644 --- a/lib/nfss.pm +++ b/lib/nfss.pm @@ -444,8 +444,8 @@ sub nfss_cgi { } for($n = 0; $n < 10; $n++) { my $str = trim((split(',', $nfss->{graph_0}))[$n]) || ""; - if(grep { $_ eq $str } @nfsv) { - my ($i) = grep { $nfsv[$_] eq $str } 0..$#nfsv; + if(grep {$_ eq $str} @nfsv) { + my ($i) = grep {$nfsv[$_] eq $str} 0..$#nfsv; push(@DEF, "DEF:nfs_$i=$rrd:nfss_$i:AVERAGE"); push(@tmp, "LINE1:nfs_$i$AC[$n]:" . sprintf("%-12s", $str)); push(@tmp, "GPRINT:nfs_$i:LAST: Cur\\: %6.1lf"); @@ -526,8 +526,8 @@ sub nfss_cgi { undef(@DEF); for($n = 0; $n < 10; $n++) { my $str = trim((split(',', $nfss->{graph_1}))[$n]) || ""; - if(grep { $_ eq $str } @nfsv) { - my ($i) = grep { $nfsv[$_] eq $str } 0..$#nfsv; + if(grep {$_ eq $str} @nfsv) { + my ($i) = grep {$nfsv[$_] eq $str} 0..$#nfsv; push(@DEF, "DEF:nfs_$i=$rrd:nfss_$i:AVERAGE"); push(@tmp, "LINE1:nfs_$i$AC[$n]:" . sprintf("%-12s", $str)); push(@tmp, "GPRINT:nfs_$i:LAST: Cur\\: %6.1lf"); @@ -607,8 +607,8 @@ sub nfss_cgi { undef(@DEF); for($n = 0; $n < 10; $n++) { my $str = trim((split(',', $nfss->{graph_2}))[$n]) || ""; - if(grep { $_ eq $str } @nfsv) { - my ($i) = grep { $nfsv[$_] eq $str } 0..$#nfsv; + if(grep {$_ eq $str} @nfsv) { + my ($i) = grep {$nfsv[$_] eq $str} 0..$#nfsv; push(@DEF, "DEF:nfs_$i=$rrd:nfss_$i:AVERAGE"); push(@tmp, "LINE1:nfs_$i$AC[$n]:" . sprintf("%-12s", $str)); push(@tmp, "GPRINT:nfs_$i:LAST: Cur\\: %6.1lf");