Jack, just a few hints regarding Perl and modules (trying to increase the Perl user base ;-)
You can get all the good modules from the CPAN (comprehensive perl archive network).
It is an invaluable source of combined Perl programmers' efforts, and can save you many, many hours.
Patrick has pointed you already in the right direction.
Here especially you can get Date::Calc
http://www.cpan.org/modules/by-module/Date/You can download every module and install it almost always using the same mantra:
1) unzip and untar tarball
2) cd to new directory
3) *read* the README to find out prerequisites
4) issue "perl Makefile.PL"
this will create a Makefile using the ExtUtils::MakeMaker module
5) make
6) make test
7) make isntall
(this step should be done as root to have the module installed in the sit_lib subdir under the perl tree)
*But* it can save you a lot of repetitive, manual downloading, making, installing if you use the module CPAN by Andreas K??nig
You first have to do a configuration run.
issue
perl -MCPAN -e shell
will get you ask you many questions which you interactively will have to answer.
If you are sitting behind a proxy/firewall like me, things can be a bit tricky (but CPAN module will ask you for that).
It may also help to download and install wget first and set the passive flag when you are behind a proxy.
The after all this unique work you simply install whole bundles like this
e.g.
cpan> install Bundle::LWP
and watch in admiration what the CPAN module is doing.
But first of all get and install a decent Perl version (e.g. 5.6.1)!!!
Madness, thy name is system administration