But I recommend using either [url=http://search.cpan.org/author/SHERZODR/CGI-Session-3.11/]CGI::Session or one of options shown below instead of just using random characters to create session ids (I'm assuming you're creating session ids because of the $sid).