why wouldn't you be able to create the cookie, and
display it all on one line.. ??
There is no reason why this wouldn't work:
print "Set-Cookie: ", cookie(-name=>'login',-value=>'bliz'), "\n";
But, to go one more step.. you are using the CGI
package, let it handle the work of the headers...
print header(
-type => 'text/html',
-cookie => cookie(-name=>'ident',-value=>'eatit200')
);