the directory containing perl was in your PATH variable while the current directory is not (its a security measure). the '#!' on the first line simply means that the file contains commands to be interpreted by the interpreter following these symbols (i think they are called magic numbers or something).
whenever executing a script/executable in the current directory, make sure of the following * check the permissions, you should have read _and_ execute permissions. * if the current directory is not included in the PATH (type echo $PATH to check), prepend ./ to the script/executable name (e.g. ./test.pl) hth. On Wed, 30 Jan 2002 03:28:24 -0500 Daniel Chen <[EMAIL PROTECTED]> revealed these words to me: > Hi, > > I am using Mandrake 8.1 with bash shell. > Today is my first time using perl script. I read from the book said if I > add #!/usr/bin/perl to the first line of my perl script, I can execute > the script by just typing the name of the script into the command line. > I have set the permission of this test.pl to 777 > > However, when I did that, the shell gave me a error message said > bash: test.pl: command not found > > If I type > perl test.pl > or > /usr/bin/perl test.pl > then the perl script will work perfectly > > Please help me! > > Daniel > > > -- "Programming, an artform that fights back." ============================= Anuerin G. Diaz Design Engineer Millennium Software, Incorporated 2305 B West Tower, Philippines Stocks Exchange Center, Exchange Road, Ortigas Center, Pasig City Tel# 638-3070 loc. 72 Fax# 638-3079 =============================
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com