in reply to Hash sort with equal values

I think you could also use this:

@sorted = sort { $hashed{$a} <=> $hashed{$b} } sort keys %hashed;

although I'm fairly sure it's less efficient that the previous suggestions.