use Date::Manip; my $total = ParseDateDelta(""); while (<>) { chomp; my $start = $_; chomp(my $end = <>); ## Build date/time stamps for start and end. $start = join ' ', (split /\t/, $start)[1,0]; $end = join ' ', (split /\t/, $end)[1,0]; ## Add delta of start and end stamps to ## total delta. $total = DateCalc( DateCalc($start, $end), $total); } print "Total hours online: ", Delta_Format($total, 0, "%hd"), "\n";