@dates = map { $_->[0] } sort { $a->[1] >= $b->[1] } map { my $f = $_; /(\d\d)-(\d\d)-(\d{4})/g; [ $f, "$3$2$1" ] } @dates;