in reply to convert user-entered date to compare with mtime
I'd suggest you use a module that parses the date, like Date::Parse or Date::Manip. Search on cpan for date will give you quite a list of modules.