for(0..1000) { push(@huge, {key=>rand, value=>'hlaghlagh'})} @index=(0..$#huge); @index=sort { $huge[$a]->{key} <=> $huge[$b]->{key} } @index;