I would like to thank every one for their input. All the comments were helpful. This was more a programming exercise than anything else, but I have run into apache logs that were in a mess that needed to be sorted. It was just an idea I had and I wanted to flesh it out. Again thanks to everyone.