# sort the data in the array by date my @sdata = map $_->[0], sort { $b->[1][2] <=> $a->[1][2] or # year $b->[1][1] <=> $a->[1][1] or # month $b->[1][0] <=> $a->[1][0] or # day $b->[1][3] <=> $a->[1][3] or # Stunde $b->[1][4] <=> $a->[1][4] or # Minute $b->[1][5] <=> $a->[1][5] # Sekunde } map [$_, [split m{[/: ]}, $_->{date}]], @data;