diff --git a/Check.pm b/Check.pm index 5607c35..a8e7f36 100644 --- a/Check.pm +++ b/Check.pm @@ -52,7 +52,7 @@ sub action # Age my $lastBackup = ( @Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2; - $lastAge = sprintf("%.1f", (time - $lastBackup{startTime}) / (24 * 3600)); + $lastAge = sprintf("%.1f", (time - $Backups[$lastBackup]{startTime}) / (24 * 3600)); # Color for age if ( $lastAge < $frequency ) {