http://qs321.pair.com?node_id=921202


in reply to Re^2: Perl CGI Cookies "Content-Type:text/html" showing at top of html.
in thread Perl CGI Cookies "Content-Type:text/html" showing at top of html.

print "Content-type:text/html\n\n";
You will need to add a print header; line in your other if clauses. Otherwise your script will crash. (or set a flag when you have sent it and test the flag to see if it needs sending)