Date::Manip, or if you need the speed
Date::Calc. =)
Alakaboo
"Who gave HIM a Perl interpreter?!"
Update:
#!/usr/bin/perl -w
use strict;
use Date::Manip qw(ParseDate DateCalc UnixDate);
foreach my $i (0..13) {
# create a date by subtracting iterator ($i) days from today
my $date = &DateCalc('today', "-$i days");
# print the formatted date (DDmmmYY)
print &UnixDate($date, '%d%b%y'), "\n";
}
merlyn's example is far superior to both Date::Manip
and Date::Calc, and you should use that instead if you
can.