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] } # day map [$_, [split /\//, $_->{date}]], @data;