in reply to Trouble writing a cookie with CGI::Session

In the documentation, they have the following:

$cookie = new CGI::Cookie(-name=>'CGISESSID', -value=>$session->id); print $cgi->header(-cookie=>$cookie);

Of course you can just use cookie(-name... and all will be well. The syntax you used produces a cookie as such:

CGISESSID=whatever-it-is; path = /

Which has no expiration and as such expires immediately. I personally don't like using print $session->header since you can only use one cookie and it specifies the type. Hope this helps.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1