push @$records, { timereceived => $dtevent, ... #### @$records = sort { $a->{timereceived} <=> $b->{timereceived} } @$records;