foreach (sort $logdata->{$a}{time} cmp $logdata->{$b}{time}) {