in reply to cgi theory

you can print out more than one header the following way:
print "Content-Type: text/html\n"; print "Set-Cookie: $cookie_object\n\n";
notice you can print individual headers out by ending them with a simple \n the last header must have \n\n to finish prionting all the headers. depending on whethere you are using strict or warnings printing out multiple:
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
will produce some warnings. Printing out a header informs the program of the type of data being processed