Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have using ASP and JSP. They both have session cookie which will track the user through the whole seesion when he/she on your website. But once user close ALL copies of the browser, the session is gone and session cookie destroyed. How can I implement this. Since tracking user session is very important, but I don't want the cookie still there once user leave the session. Thanks

Replies are listed 'Best First'.
Re: how I implement session cookie
by Anonymous Monk on Feb 03, 2000 at 00:23 UTC
    You can use the CGI.pm module. For more info, type: perldoc CGI at the command prompt.
Re: how I implement session cookie
by dlc (Acolyte) on Feb 03, 2000 at 02:40 UTC

    cookies have an 'expires' field. by default (i.e., if it is not set), cookies expire when the user closes the browser. you can override this by setting the expires time to some number, such as +3M (3 months from now) or +2Y (2 years from now). as you may have guessed, setting cookies to a negative value means that they are already expired; you can have a user "log out" by setting a cookie with a negative expiration time. the short cuts are: M for months, d for days, m for minutes, Y for years.