in reply to how to connect to cgi using Html files

Try to add this line into your CGI script:

use CGI::Carp qw(fatalsToBrowser);

Also don't forget to use warnings; and use strict;.

If this doen't help than look into your webserver error log (under Windows this must be something like log\error_log in your folder where you install Apache).