http://qs321.pair.com?node_id=66922


in reply to Returning the lowest key in a hash (or highest)

Sort takes O(n log n). Simply walking the keys of the hash is only O(n).
my ($min, undef) = each %hash; $min > $_ and $min = $_ for keys %hash;
Updated: Fixed that bug...:)