On Fri, Mar 7, 2008 at 1:35 PM, Gary Yang <[EMAIL PROTECTED]> wrote:
> Hi,
>   Below is my Perl script. The script named, test1.pl
>   test1.pl
>
>   #!/usr/local/ActivePerl-5.10/bin/perl -w
>
>   print "$^O\n";
>
>
>   I have to type, "perl test1.pl" in order to run it. I got command not found 
> if I simply typed test1.pl. Can someone tell me why and how to fix it?
>
>   test1.pl
>   -bash: test1.pl: command not found
snip

First, you  must make sure it has  been marked as executable:

chmod a+x test1.pl

then you must either make sure it is in a directory in your PATH or
run it with either a relative or absolute name:

./test1.pl

/home/username/test1.pl
-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

Reply via email to