http://www.perlmonks.org?node_id=162723


in reply to Date difference?

At the risk of giving you a RTFM answer, see Date::Calc, and more specifically Delta_DHMS:
use Date::Calc qw/Delta_DHMS/; ... my @date_one = qw/2002 04 25 23 12 40/; my @date_two = qw/2002 03 23 15 25 21/; my ($dd, $dh, $dm, $ds) = Delta_DHMS(@date_one, @date_two);