print "$_ => $hash{$_}\n" for sort {$hash{$b} <=> $hash{$a} || $a cmp $b} keys %hash; #### use strict; use warnings; use Unicode::Collate; use utf8; binmode STDOUT, ':encoding(UTF-8)'; my $collator = Unicode::Collate->new(); my %hash = ( 'James' => 43, 'John' => 2, 'Jeffrey' => 18, 'Jamie' => 19, 'Joseph' => 43, 'Ĵan' => 43, # Was latin capital letter j with circumflex before PerlMonks got a hold of it 'Janice' => 12, 'Jasmin' => 7, 'Justin' => 31, 'José' => 43, 'Jordan' => 43, ); print "$_ => $hash{$_}\n" for sort {$hash{$b} <=> $hash{$a} || $collator->cmp($a,$b)} keys %hash;