in reply to Keeping "keys" in order when passed to an Array

You could sort the keys when you pass them to @sorted_scores, like so:
my @sorted_scores = sort keys %hashFinal;
Then as long as: ..then (I believe) you should be okay.

However, that's still pretty fragile and probably not really recommended.

Cheers,
Darren :)