while () { chomp (($date,$atime,$etime,$mth,$port,$attrID,$value)=split(/;/,$_)); # Convert the log time to UTC time ($HH, $MM, $SS)=split(/:/,$etime); ($year, $month, $day) = $date =~ m/^(.{4})(.{2})(.*)/; $month -= 1; $Time = timelocal($SS, $MM, $HH, $day, $month, $year); # Collect non-zero data if ($Conf[7] =~ /NO/i) { if ($value != /^0/) { # Build a hash of MTypeHandles with their unique ports $Hash{$mth}{$port}++; my @entry = (); $attrID =~ s/\s*//g; $port =~ s/\s*//g; if ($port =~ /\-/) { $port =~ s/\-//; } $key = $attrID; $val = $DS_Info{$key}; $val = join("", $val, $port); @entry = ($Time, $mth, $val, $value); # Populate the data array push @Data, [@entry]; } } # Collect zero data elsif($Conf[7] =~ /YES/i) { # Build a hash of MTypeHandles with their unique ports $Hash{$mth}{$port}++; my @entry = (); $attrID =~ s/\s*//g; $port =~ s/\s*//g; if ($port =~ /\-/) { $port =~ s/\-//; } $key = $attrID; $val = $DS_Info{$key}; $val = join("", $val, $port); @entry = ($Time, $mth, $val, $value); # Populate the data array push @Data, [@entry]; } }