sub sterilize { my $char = shift; $char =~ tr/EéÉêÊè/e/; # All of your other transliterations go here too. return $char; } my @array = ( # Your stuff to be sorted goes here ); my @sorted; @sorted = map { $_->[1] } sort { ( $a->[0] cmp $b->[0] ) or ( $a->[1] cmp $b->[1] ) } map { [ sterilize($_), $_ ] } @array;