PDA

View Full Version : Perl Scripts: Wither #! /bin/perl?



dpfaigin
04-14-2004, 01:00 PM
On my old provider, I indicated perl scripts by having them executable, with the first line being #! /bin/perl

Here at westhost, when I try to do that, I get the error

sh: ./mrj.size: /bin/perl: bad interpreter: Permission denied


(note that my script works fine if I do:

perl ~/bin/mrj.size)

So, what's different here?

wildjokerdesign
04-14-2004, 02:16 PM
The path here is
#!/usr/bin/perl

Have you tried that?

All the paths are listed here
http://manual.westhost.com/part6.html#ca-paths

Not sure that was what you where asking but it should get your scripts running. :)

klamathsystems
02-24-2005, 12:13 PM
If you have a bunch of scripts and don't want to change them all, you could just make a link from /bin/perl to /usr/bin/perl:

$ ln -s /usr/bin/perl /bin/perl

A couple things to check first:
1. make sure your perl interpreter is actually at /usr/bin/perl
2. make sure it already isn't linked in /bin/perl

On my host (a virtual private server) both /usr/bin/perl and /bin/perl are linked to /usr/local/bin/perl (which is linked to /usr/local/perl/bin/perl. It did not require any setup on my part.

You might check the westhost site manager for your account to see if perl is installed. Maybe try clicking uninstall and then reinstall, or build perl yourself and link to it. (Though I'm having trouble doing just that myself.)

klamathsystems
02-24-2005, 03:42 PM
See this thread for a possible solution:

http://forums.westhost.com/phpBB2/viewtopic.php?t=1849

Someone else was having frouble with files using windows file formats:
\r\n instead of just \n