@lines = ; foreach $line (@lines) { if ($line != m/\s/) { # regex to turn dates into epoch ($dd, $mm, $yy, $hh, $mt, $tt, $tdd, $tmm, $tyy, $thh, $tmt, $ttt) = $line =~ /(\d+)-(\d+)-(\d+)\s(\d+):(\d+)\s(am|pm)-(\d+)-(\d+)-(\d+)\s(\d+):(\d+)\s(am|pm)/; if ($tt == 'pm') { $hh = $hh + 12; } if ($ttt == 'pm') { $thh = $thh + 12; } $t_from = timelocal(0,$mt,$hh,$dd,$mm,$yy); $t_to = timelocal(0,$tmt,$thh,$tdd,$tmm,$tyy); $s_elapsed = $t_to - $t_from; ...