While most, if not all of the nodes already giving feedback to your question have very good ideas, Abigail-II is on the money in my book. Date::Manip is probably the best date manipulation (as the name implies) module that I have come accross. It is a little large, but it works VERY well. It handles almost any form of manipulate, also uses regular speech paterns to decipher what you want to do (such as "last day of the month"). Also, the documentation is NOT lacking. This module will not only make your code shorter (as in the number of lines to produce the same result), it also makes your code a lot easier for someone else to read. It will definitly make life a lot easier where dates are concerned.
Paulster2You're so sly, but so am I. - From the movie Manhunter.