J
Jessica Smith
I'm using Mac OS X, and I'm trying to run a script I copied from a
tutorial. The script is online at
http://www.elanus.net/cgi/examples.cgi/view/ex_0302.txt
It's chmod'ed 755, just like it should be, and the sh-bang line is
correct. Yet, when I run the program in Terminal, I get:
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: line 18: syntax error near unexpected token `qw
'
../mail_form.cgi: line 18: `use CGI qw
standard);'
[Jessica-Smiths-Computer:/library/webServer/cgi-executables] jessicas%
When I hit it in Explorer, I get an Internal Server Error, and then my
error log produces this message:
[Tue Nov 4 13:21:06 2003] [error] (8)Exec format error: exec of
/Library/WebServer/CGI-Executables/mail_form.cgi failed
[Tue Nov 4 13:21:06 2003] [error] [client 192.168.7.33] Premature end
of script headers: /Library/WebServer/CGI-Executables/mail_form.cgi
I've searched newsgroups, Perl references, CGI references and 2
dead-tree Perl manuals, and I still have no idea what is causing the
problem.
Please help! Thanks.
tutorial. The script is online at
http://www.elanus.net/cgi/examples.cgi/view/ex_0302.txt
It's chmod'ed 755, just like it should be, and the sh-bang line is
correct. Yet, when I run the program in Terminal, I get:
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: =: command not found
../mail_form.cgi: line 18: syntax error near unexpected token `qw
../mail_form.cgi: line 18: `use CGI qw
[Jessica-Smiths-Computer:/library/webServer/cgi-executables] jessicas%
When I hit it in Explorer, I get an Internal Server Error, and then my
error log produces this message:
[Tue Nov 4 13:21:06 2003] [error] (8)Exec format error: exec of
/Library/WebServer/CGI-Executables/mail_form.cgi failed
[Tue Nov 4 13:21:06 2003] [error] [client 192.168.7.33] Premature end
of script headers: /Library/WebServer/CGI-Executables/mail_form.cgi
I've searched newsgroups, Perl references, CGI references and 2
dead-tree Perl manuals, and I still have no idea what is causing the
problem.
Please help! Thanks.