No - what you're doing is just a part of the HTTP, normally handled silently by your webserver. With html pages, your webserver inserts the http headers automatically. You could use something like CGI.pm or HTML ::Template to generate pages in different ways without having to print the headers yourself.
Here is the spec for HTTP 1:
Don't Stand on your head - you'll get footprints in your hair