Noob stuck with Perl/CGI

CrackaLackaZe

Senior member
Jun 29, 2002
922
0
76
I have blahblah.cgi in the cgi-bin directory.

The chmod is set to 755.

The perl command line is correct.

perl -wc blahblah.cgi reports syntax OK


It's a simple scipt with the following code:



Any one know how to make the server error 500 go away?


 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Bad interpreter line.

#!usr/bin/perl should be #!/usr/bin/perl (or possibly #!/usr/local/bin/perl).
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: CrackaLackaZe
Originally posted by: xcript
Bad interpreter line.

#!usr/bin/perl should be #!/usr/bin/perl (or possibly #!/usr/local/bin/perl).

ok I changed that, but it still wont work.

Make sure your newlines match the OS you're running the script on. If you write the file on windows and then transfer it to a unix machine in binary mode, it won't necceesarily run. Make sure you're using unix newlines if you've got a unix server.
 

CrackaLackaZe

Senior member
Jun 29, 2002
922
0
76
w00t, I got it to work, thanks guys...it was the #!/usr/bin/perl line that did it. I just had another little thing I added to the code that wasn't in the original post and it worked after I removed that.