my $sid = $cgi->cookie('CGISESSID') || $cgi->param('CGISESSID') || undef; my $session = new CGI::Session(undef, $sid, {Directory=>'tmp/'}); $session->expire(10);