in reply to The day of today

My favourite module for the job is Date::Simple, as long as you only have to deal with date, not time. It has a very simple interface, you'll like it.

If you don't want a module, can get rid of the line noise with this trick:

my ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $isDST) = localtime(); $year += 1900; # get absolute year $month++; # you'd expect the January to be the first # month, not the 0th ;-)