Assuming the database approach is not appropriate, isn't this what the OS sort is for? Why not just reverse-sort the file on the score field, then extract the 'top 20' scores (which may or may not be the first 20 lines) of the sorted file with a nearly-trivial Perl script? (If 'top 20' really is the first 20 lines, extraction could even be done with head.) If an ID may be present more than once with different scores, a slightly-less-trivial Perl script would be needed to extract the IDs with the 'top 20' scores, however defined.
In reply to Re: Dealing with Hash Table
by AnomalousMonk
in thread Dealing with Hash Table
by ŞuRvīvőr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |