You need to understand about http request/response headers, without which your browser/server will throw up errors.
if you're using the CGI module in your script, then one of the first things to do is "print header();"
the hardest line to type correctly is: stty erase ^H