binmode(STDOUT); $html = ...; print "Content-Type: text/html\r\n", "Content-Length: ", length($html), "\r\n\r\n", $html;