I recently got a new(er) computer, and I did a fresh install of Jaguar and Perl, etc. on it. Unfortunately, I'm having a very basic problem, and I'm not finding
guidance online for it.


Now, I have used MacPerl extensively, and have used Perl on UNIX systems as well, but have not installed it there. Basically, it looks like Perl is installed correctly, but it will not recognize the "shebang" first line. (I understand from online tutorials that I have it set up correctly for OSX, and Perl does exist at that path.) The program runs if I pass it directly to Perl.

Oddly enough, shell scripts (which I am less familiar with) don't seem to pay attention to the "shebang" line either. I am guessing that the problems are related.

I have played with the ownership and permissions, but it doesn't seem to fix the problem. Do need to change some other setting? If so, where?



[Fujisawa:~/Documents/MacPerl] tim% ls -l test.pl
-rwxrwxrwx  1 root  staff  45 May 21 23:16 test.pl
[Fujisawa:~/Documents/MacPerl] tim% cat test.pl
#!/usr/bin/perl -w

print "Hello World!\n";

[Fujisawa:~/Documents/MacPerl] tim% test.pl
test.pl: Command not found.
[Fujisawa:~/Documents/MacPerl] tim% perl test.pl
Hello World!
[Fujisawa:~/Documents/MacPerl] tim%




[Fujisawa:~/Documents/MacPerl] tim% ls -l *.sh -rwxrwxrwx 1 tim staff 24 May 21 22:54 d.sh [Fujisawa:~/Documents/MacPerl] tim% cat d.sh #!/bin/sh echo 'Hello'

[Fujisawa:~/Documents/MacPerl] tim% d.sh
d.sh: Command not found.
[Fujisawa:~/Documents/MacPerl] tim% /bin/sh d.sh
Hello
[Fujisawa:~/Documents/MacPerl] tim%
--
       Tim Bailey       |\/  "Of all tyrannies, a tyranny exercised for the
    [EMAIL PROTECTED]    |\/  good of its victims may be the most oppressive.
   [EMAIL PROTECTED]   |     It may be better to live under robber barons
 http://www.moonrise.org         than under omnipotent moral busybodies.
        --'--,--<@           The robber baron's cruelty may sometimes sleep,
                               his cupidity may at some point be satiated;
  but those who torment us for our own good will torment us without end,
         for they do so with the approval of their own conscience."
                             -- C.S. Lewis

Reply via email to