in reply to Limit the size of a hash

1) use an array (say presized to 12k) 2) when you've read in 12k elements 3) sort the array 4) and discard all but the highest 10 ( splice)

Then put it in a hash or whatever you need to do

  • Comment on Re: Limit the size of a hash (use an array)