diff --git a/Check.pm b/Check.pm index 9591d66..61fb301 100644 --- a/Check.pm +++ b/Check.pm @@ -51,13 +51,10 @@ sub action } # Age - for ( my $i = 0 ; $i < @Backups ; $i++ ) { - if ( $Backups[$i]{type} eq "full" or "incr" ) { - $lastAge = sprintf("%.1f", (time - $Backups[-1]{startTime}) / (24 * 3600)); - } + if ( $Backups{type} eq "full" or "incr" ) { + $lastAge = sprintf("%.1f", (time - $Backups[-1]{startTime}) / (24 * 3600)); } - # Color for age if ( $lastAge < $frequency ) { $lastAgeColor = "MediumSeaGreen"; @@ -100,7 +97,6 @@ sub action # Ignore the last backup if it's not full or incr (which means it's either partial or active) my $i = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2; - $new_size = $Backups[$i]->{sizeNew}; $new_size_avg = int $sizes->mean; $new_size_q1 = eval { int $sizes->quantile(1) } || 0;