in reply to Problems with BBC's CGI script?

First of all, you need to put <code> tags around your source, otherwise it looks like a right mess.

Second of all, based on the linenumber in the error message and the linecount of the code you posted, it appears that the first line of your file is actualy

www.newman.ac.uk/cgi/
And that is no way for a propper CGI file to start.

Also, that's the only reason I can see why the source you quoted could give you the error you quoted.