in reply to Want to use Date module

Another aproach
use Date::Format; use Date::Parse; $ts = &str2time("2009-05-16"); $ts2= &str2time("2009-06-02"); for (my $i=$ts; $i <= $ts2; $i+=60*60*24){ print &time2str("%Y%m%d", $i)."\n" }