Tue, 14 Oct 2003 08:38:22 +0100 John Delacour wrote:
At 12:16 am +0100 14/10/03, Alan Fry wrote:

do shell script "/Users/alanfry/Desktop/backatcha.pl"

results in the error:

...backatcha.pl:perl:bad interpreter:Permission denied

  The script runs fine from the Terminal with the command 'perl'
 however. What am I missing?

You have two choices:


do shell script "perl " & quoted form of <pathname>

or, if the permissions are set to executable and the script has the
shebang  (chmod <pathname> +x),

do shell script "./Users/alanfry/Desktop/backatcha.pl"

for example /tmp/test.pl reads

#!/usr/bin/perl
print "hello\n"


do shell script "./tmp/test.pl" --> "hello"

Running a 'chmod' fixes the problem and both methods above now work. However I don't seem to need the dot before the path (?) in the case where the file is 'executable'.


Many thanks,

Alan

Reply via email to