my @sorted_keys = map substr($_, 10), sort map sprintf('%02d%02d%5$s%02d%02d', m{(\d+)/(\d+) \@ (\d+):(\d+) (AM|PM)}) . $_ keys(%line_data);