Perl and the CGI module don't have a builtin concept of sessions like ASP does. You have to manage the sessions yourself, and so it's fairly easy: when you create a new session run some code, and when you destroy a session run some code. A straightforward and reliable module for managing sessions is CGI::Session.