Try HERE documents. I haven't used them to print the Content-type line in my scripts, but I would expect them to work for that as well. They're great for short blocks of HTML code.
print <<HEAD;
<html><head><title>Page title</title></head>
<body bgcolor="white">
HEAD
# create the page
print <<FOOT;
</body></html>
FOOT