in reply to Hashes - sorting keys

I don't understand what your first loop should do. Currently it stores alle the hash keys in @temp if they (by incident) are equal to a value in an array @nums.

Your code for sorting is fine, but you don't sort all hashkeys but just those picked in your first loop. To sort all of them you can use, as davorg already said:

my @temps = sort { $a <=> $b } keys %hash;
Your second loop looks similar to the first one. Again you compare the randomly ordered hashkeys with the numbers stored in an array (@temps).

This won't get you very far. If you need all the values of your hash, you can get them, again as davorg stated

@fluors= @hash{@temps};
BTW: If you deal with numbers and want to compare them, you should use == instead of eq. Simply because 0.0 == 0 but "0.0" ne "0"