in reply to Problem with CGI script

It appears you are trying to follow this super ancient tutorial, that does not use the CGI module.

Use one of these Tutorials: CGI Programming