Think about Loose Coupling | |
PerlMonks |
Re: Sorting a logfile by date to print to htmlby mikeB (Friar) |
on Oct 09, 2001 at 21:23 UTC ( [id://117801]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|