On Wednesday 22 December 2004 04:35 pm, Isaac Sherman wrote:

> >> tcsh: hw.pl: Command not found.

Welcome to perl on OSX!

perl hw.pl works because perl is in your path and you are giving it hw.pl as 
an argument.

> Unfortunately, even after setting PATH, it still gives the same error,
> whether I type ./hw.pl or just hw.pl.

You probably want to be able to just execute your scripts instead of directly 
invoking the interpreter. After all - that's what #!/usr/bin/perl is for.

1) Make sure you have execute permissions on your script:
        $ chmod 755 ./hw.pl

2) Find out where perl really is:
        $ which perl

Although I'm certain it should be /usr/bin/perl, perhaps something is 
different on you system. The fact that perl hw.pl works indicates that perl 
is there and in your path. which will output it's location.

If it is not /usr/bin/perl, you can either change your shebang 
(#!/usr/bin/perl) to reflect it's actual location or sym link it:

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


Happy coding!

-- cs

Reply via email to