my @sorted_date = map { [ $_->[1], $_->[0], $_->[2] ] } sort { $b->[1] <=> $a->[1] } map { my @n = $list{$_} =~ /^(\d+)\.(\d+)\.(\d+):/; my $d = sprintf "%02d%02d%02d", @n[2,0,1]; [join('.',@n), $d, $_] } keys %list; step 1: build a list of hash keys: keys %list; step 2: build a new array by: for each element of the list built in step 1, capture the MM, DD and YY values into @n with the @ary = $str =~ /pattern/ idiom, normalize the date into YYMMDD form, store the original date, normalized date and hash key in anonymous array step 3: do the sort on normalized dates step 4: just reshuffle the fields in sorted data.