use strict; use CGI qw/cookie/; my $c = cookie(-name => 'foo', -value => 'bar', -expires => '+3M', -domain => '.yourdomain.com', -path => '/cgi-bin/database', -secure => 1 );