in reply to Re: Re: *Fastest* way to print a hash sorted by value
in thread *Fastest* way to print a hash sorted by value
Check out the helpful advice in this thread: Fast/Efficient Sort for Large Files
Then, you can read in the lines until you have the top N values and you're done.
If your log files are not easily sortable using sort(1) because of strange formatting and delimiters (like web server access logs), you may pre-process them (with Perl, of course) so that they have nice column separators for sort to recognize.
|
|---|