in reply to Finding gaps in date ranges

I would approach this problem with a conversion, from date format, to a more easily dealt-with numeric format, and vice-versa:
sub find_gaps { my ($pdate, @dates) = sort {$a <=> $b} map { my ($y,$m) = split /-/; $y*12 + $m - 1 +} keys %{+pop}; my @skips; foreach (@dates) { push @skips, $pdate+1 .. $_-1; $pdate = $_; } [ map { int ($_/12) . "-" . (1 + $_%12) } @skips ]; }
UPDATE: couldn't help golfing things a bit...
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print