It would be nice to know how exactly it doesn't work properly. Being that I may not have such logs to test on. Additionally there are a number of things anyone could point out that could potentially be issues, but without a knowledge of what happens I'm not brave enough to predict. If nothing else, I'll suggest cleaner code with strict and lexical filehandles, and watch out for weak regex.