As name is the only required attribute on Set-Cookie I see no problem with your code (except that you have a lowercase "cookie" instead of the correct uppercase "Cookie" in "Set-Cookie").
For more info:
For Perl CGIs I strongly recommend using
CGI. Creating Cookies is easy then (along with other thingies):
use CGI;
$query = CGI->new;
$cookie = $query->cookie(-name=>'sessionID',
-value=>'xyzzy',
-expires=>'+1h',
-path=>'/cgi-bin/database',
-domain=>'.capricorn.org',
-secure=>1);
print $query->header(-cookie=>$cookie);
alex pleiner <alex@zeitform.de>
zeitform Internet Dienste