in reply to Sorting hash values

You wish to sort a list of hash keys in order by the values they index. Try this:

my @ips_prioritized = sort { $ip{$a} <=> $ip{$b} } keys %ip;

Dave