as far as i know it is not possible to do such a thing in perl, the best solution would be to use cookies in perl, but even then you could not be that accurate.

you might want to look into a javascript program, it seems i remember some function that can be used to alert a script when someone closes the window, which in theory might work, but unfortunatly my javascript is just not that good.

yes, but the problem with that is that say you have a site where users are only there a short period of time, if you get 500 hits in 5 minutes, but 380 of them leave within 30 seconds, then your "count" is off by 380, i dont see that as a reliable way of doing it, i believe that for my money i would want more accuracy, so i do stand by my words, but i also understand that for some projects this accuracy is not nessesary, so i do understand your thoughts also.