in reply to Sorting a hash in one line

I answered this in the CB when you asked there. Here it is again since you asked again.

my @sorted_keys = sort { $a=~tr/d// <=> $b=~tr/d// } keys(%hash);