in reply to Hash sort with equal values
@sorted = sort { $hashed{$a} <=> $hashed{$b} } sort keys %hashed; [download]
although I'm fairly sure it's less efficient that the previous suggestions.