@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)/; #### $line =~ /(\d\d)-(\d\d)\s+(\d\d):(\d\d)\s+([ap]m)-(\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d)\s+[ap]m/ #### if ($tt == 'pm') { $hh = $hh + 12; } if ($ttt == 'pm') { $thh = $thh + 12; } #### if ($tt eq 'pm') { $hh += 12; } if ($ttt eq 'pm') { $thh += 12; }