in reply to Setting up date to subtract specific number from it
Well, if you just search for “date” at http://search.cpan.org, you will today get 5000 hits ...
Some suggestions of packages that I have used very often:
But there are literally thousands more, including some pure-fun ones. Search as-above for “DateTime Calendar” and then get your time-machine ready: DateTime::Calendar::Mayan, DateTime::Calendar::FrenchRevolutionary, DateTime::Fiction::JRRTolkien::Shire ...
The one thing you don’t have to do in Perl is to “write your own” routines to handle positively anything that has to do with dates/times. I find it very convenient to use the packages which define a date-time object, i.e. “this thing ‘is a’ date/time, its internal implementation is blissfully opaque, and I can tell it to do things and ask it questions and It Just Works.™” Functional interfaces are much more baroque due to the sheer number of options that must be supported by a thorough handling of dates.