http://www.perlmonks.org?node_id=445509


in reply to CGI::Session - non-stop session creation problem

If I understand your question, you could do:

1. A user enters your website;
2. Check if $session->param("name") exists; IF exists is a privileged user ELSE is a visitor;
3. If is a visitor create a (normal) session variable and store a cookie;
4. If visitor logs in, you need to add a session variable, like, for example:

$session->param("name", $cgi->param("name"));
and the visitor 'upgrades' to 'privileged user'.