Since you only need to go through the list once instead of a full sorted list (so that time is in O(n) rather than O(n log n)) just do something like:
my $l;
foreach $i (keys(%hash)) {
$l = $l < $i ? $l : $i;
}
$hash{ $l } = ...
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain