Print header with CGI
The header prints out Content-type: text/html\n\n . You can do the same thing with sessions above, which also sets a cookie.
#!/usr/bin/perl use strict; use CGI; $cgi = CGI->new(); print $cgi->header();
print $cgi->header(); actually sets a cookie, prints the date, and the Content-type: text/html\n\n portion of the headers.
You can set that cookie manually with,
$cookie = new CGI::Cookie(-name=>'CGISESSID', -value=>$session->id); print $cgi->header(-cookie=>$cookie);
[Click to add or edit comments])
Please prepend comments below including a date