At 10:05 pm +0100 14/10/03, Alan Fry wrote:

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'.

You will if its not in your PATH.


Compare these three scripts. Since tmp.pl is not in your path, you will get an error with the third:


do shell script "cd /tmp; perl -e ' $f=qq~tmp.pl~; open F, qq~>$f~ ; print F qq~#!/usr/bin/perl\\nprint qq(hello\\n)~ ' ; chmod +x tmp.pl ; ./tmp.pl"

do shell script "cd /tmp; perl -e '
$f=qq~tmp.pl~;
open F, qq~>$f~ ;
print F qq~#!/usr/bin/perl\\nprint qq(hello\\n)~
' ; chmod +x tmp.pl ;      perl tmp.pl"

do shell script "cd /tmp; perl -e '
$f=qq~tmp.pl~;
open F, qq~>$f~ ;
print F qq~#!/usr/bin/perl\\nprint qq(hello\\n)~
' ; chmod +x tmp.pl ;      tmp.pl"



Reply via email to