in reply to help on getting date

Take a look at Date::Calc for working with dates. The documentation for it has a recipe for comparing dates.

As far as formatting to mm-dd-yy, you can use printf or sprintf to do that depending on what you want to do with it once it is formatted.