in reply to Another cookie setting question
my ($to_set) = $cgi->cookie(...); # and later print $cgi->header(...); [download]
Update: Pointed the link to HTTP COOKIES.