#!/usr/bin/perl use strict; use warnings; use Time::Local; use POSIX 'strftime'; my $start = date2epoch('2005-07-12'); my $end = date2epoch('2005-08-03'); my $curr = $start; while ($curr <= $end) { print strftime "%Y-%m-%d\n", localtime($curr); $curr += 24 * 60 * 60; } sub date2epoch { my ($y, $m, $d) = split /-/, shift; return timelocal(0, 0, 12, $d, $m - 1, $y - 1900); }