my @sorted = map substr($_, 6), sort map { local $_ = $_; s/^\S+\s*//; my $ymd = join '', reverse split '/', (split / /)[1]; "$ymd$_" } @data;