In a message dated Wed, 22 Dec 2004, Isaac Sherman writes:
> Then, when, in the terminal, I typed: hw.pl while in the same directory, I
> got the following message.
>
> tcsh: hw.pl: Command not found.
>
> My meanderings in the Terminal showed that /usr/bin/perl does indeed exist.
> I also tried chmod 755 on the file, but didn't change anything.
> I'm running the latest version of Panther.

The chmod was a necessary but not sufficient step.  Your PATH environment
variable does not contain the current directory (".").  You can fix this
one of two ways:

1. setting PATH to include .:
     setenv PATH $PATH:.
   This can be run as a command and will take effect for the current shell
   only, or you can add it to your .cshrc and it will take effect for all
   future shells.

2. Type "./hw.pl" instead of just "hw.pl".

The second is recommended over the first for security reasons, as if
someone were to insert a command in the current directory you might run it
inadvertently.  It's most especially important that ., if it appears in
PATH, always appear last, so that (for instance) someone couldn't drop a
trojan into the current directory which you pick up by mistake rather than
one of the system commands.

Trey


Reply via email to