use strict; use warnings; use POSIX qw( strftime ); use Time::Local qw( timegm ); my ($y1,$m1,$d1) = (2007,23,11); my ($y2,$m2,$d2) = (2007, 4,12); my $date1 = timegm(0,0,0,$d1,$m1-1,$y1); my $date2 = timegm(0,0,0,$d2,$m2-1,$y2); my @dates; for (my $date=$date1; $date<=$date2; $date+=24*60*60) { push @dates, strftime('%Y-%m-%d', gmtime($date)); }