in reply to Sorting a logfile by date to print to html

How large is your logfile, compared to available memory? If you can keep the whole thing in memory, check out perl's sort command.

I prefer to sort dates by formatting them yyyymmdd, at which point they can be numerically sorted (or character sorted, too, in ASCII :) There may be better ways, but this one's quick and easy.

CPAN has numerous date functions that may be of help.

  • Comment on Re: Sorting a logfile by date to print to html