#!/usr/bin/perl -wT use CGI; $q = new CGI; use CGI::Cookie; $cookie = new CGI::Cookie(-name => 'foo', -value => 'bar', -domain => '.corn.com'); print $q->header( -type => 'text/html', -cookie=> $cookie ); print $q->start_html; print $q->p, "hello and $ENV{HTTP_COOKIE}"; #just checking print $q->end_html;