cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Perl to work...

N/A

Getting Perl to work...

Hello folks. Can someone help me?

I am reading 'The Llama' - the book 'Learning Perl' by Schwartz and Phoenix. It is vague about the actual uploading and running of Perl scripts.

I have uploaded 'hello.pl' to the cgi-bin folder at cgi.edwardsmale.force9.co.uk.

It looks like this:

#!/usr/local/bin/perl
print "Hello, world!\n";

I have 'chmod'd' it to 755, with: chmod 755 hello.pl.

All I get is the error message:

bash: ./hello.pl: bad interpreter: No such file or directory

Any ideas? Is my '#!/usr/local/bin/perl' wrong?

Thank you!

Ed
2 REPLIES
N/A

Getting Perl to work...

You could try #!/usr/bin/perl and see if that works.

If it doesn't, did you create the script on Windows and upload it?
N/A

Getting Perl to work...

May seem a silly question but has the cgi space been activated? Also, perl scripts need to be uploaded in ascii mode, not binary.

Cheers

Mark