Are you sure your account with your host allows the execution of cgi scripts? That sort of error would tend to mean that on an Apache host.
If you can't run cgi on your account, you might try the php route.
welcome to WebmasterWorld [webmasterworld.com], PerlNovice!
you could try '... method="GET" ...' in your form tag and see if that works.
whether your "action" script is php or perl, the POST method problem will be similar.
there are some restrictions to using the GET method so it may not work in your case or the script may not be equipped to handle the GET method.
OK, thanks for the help so far.
As an update my host pointed me to resetting the scripting which I did and then tried one of their cgi scripts which worked so cgi scripting seems to be ok. Mine (i.e. Matt's) still throws an error albeit a different one now. (Their script simply sends an e-mail to a specified address when a link is clicked. There is no POST/GET method in it.) I now get 500 internal server error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
I have tried changing the method to GET and changing the script from .pl to .cgi but still get the error. Is it my problem that people here can help with or is it on the host's server?
have you checked for an error message in the server error log?
Usually this is the bit where it all starts to turn into a foreign language to me. The last entry in the error log file says;
[error] [client ipaddress] Premature end of script headers: /home/fhlinux153/j/dominname/user/htdocs/cgi-bin/formmail.pl
Afraid this doesn't mean much to me?
Something you are going to need if you play in perl - download perl to your local computer. Google for ActivePerl for the easiest install.
type cmd, press enter.
Navigate to where the script is:
cd\ [enter] brings you to the root of your local H.D.
cd whatever\directories\to\directory\containing\script [enter]
perl formmail.pl [enter]
This is the first step, test that bugger offline. If you can SSH to the server, repeat the command line process. Get it running via command line first, then figure out what the totally useless errors mean. :-)
We won't get into how vulnerable the scripts from Matt's Archives are - M.S.A. is a good way to get your feet wet in perl. Eventually you'll want to switch to something else, or write your own. Just be aware that this mailer may give you more problems than it's worth.
Many thanks to all for all your help and advice, it is very much appreciated. Script still isn't working but host have now passed the problem onto a senior engineer to resolve so I'll leave you guys in peace, for now ;-)
Just for final closure, it works now. I installed ActiveState's ActivePerl and ran the script from command prompt. It pointed out that there was an invalid character. I edited the script from the command prompt and could see from there that a '^ had been transposed to some gibberish. Corrected that and ran it again and all was well. Uploaded the edit script and it works.
Thanks again you guys for all your help.
Just an FYI, 'Premature end of script headers' almost always means one of two things: (1) there's a syntax error in the script, or (2) the permissions on the script file are not set to 755 to allow execution.