local $| = 1; use strict; use warnings; use diagnostics; use Apache (); use Apache::Cookie (); my $r = Apache->request(); my $cookie = Apache::Cookie->new($r, -name => 'foo', -value => 'bar', -expires => '+3M', -domain => '.capricorn.com', -path => '/cgi-bin/database', -secure => 1 ); $cookie->bake; $r->content_type( "text/html" ); $r->send_http_header(); 1;