One script I have always wanted to write is one that will search through a log file created by a proxy server or firewall and give a basic report of how long each user spent browsing the web. After messing with Perl for a year or so, I could now probably figure out how to write the code but I can't quite figure out the logic. My problem comes from the information most logs contain. They simply have an entry with the URL visisted by a user as well as other data including the date and time it was visited, but not the length of time spent at that URL. Then, when the user changes addresses that new URL is logged and and so on. The problem I am struggling with is how to come up with a decent way of taking that information and adding it together to come up with a user's total time spent on the web. Keep in mind that while a user is looking at one site, the log may get several entries from other users going to other URL's. Also, the server doen't log anything when the user simply closes his browser? In other words, its not just as simple as adding those times together. What if the user quit browsing at 9:00 a.m. and starting again at 2:00 p.m.?