in reply to How to compare time

use Time::Local; my $time_secs = timelocal($secs, $min, $hour, $day, $mon, $year);
$time_secs is now epoch seconds, and comparing two times in epoch seconds is trivial.
perldoc Time::Local
for more information, documentation, etc.

You may also want to check out Date::Manip.