use CGI; my $cgi = CGI->new; my $cookie = $cgi->cookie(-name => 'CookieName', -value => 'CookieValue' ...); print $cgi->header( -cookie => $cookie, -type => 'text/html'); #print "just set a cookie on you
" print $cgi->start_html("just set a cookie on you
");