in reply to Finding gaps in date ranges

# assuming all dates are in %dates use Time::Local; my %missed = (); my ($mon, $yr) = split /-/, (sort keys %dates)[0]; my $from = timelocal(1, 0, 0, 1, $mon-1, $yr); my ($mon, $yr) = split /-/, (sort keys %dates)[-1]; my $to = timelocal(59, 59, 23, 1, $mon-1, $yr); while ($from < $to){ @date = localtime($from); $date[4]++; $date[5] += 1900; # well, you know... # add to %missed if not in %dates $missed{"$date[5]-$date[4]"}++ unless exists $dates{"$date[5]-$date[4]"}; $from += 60*60*24; # add one day } print "$_\n" for keys %missed;
--perlplexer