[oak perl] beginning perl question
Sandy Santra
santranyc at yahoo.com
Tue Dec 21 13:08:04 CST 2004
Hi, folks... I'm a super newbie with a *very* beginning perl question.
I'm writing scripts with PFE 1.01 on a Win98 machine using PerlIndigo to
execute them. My perl program (I think version 5.6.1) is located in the
"c:\pearindigo\bin" directory and I put a PATH statement in my autoexec.bat
so that typing "perl" at a command line would allow Windows to find the
program. My scripts are stored in a directory of their own and I run them
from a DOS window with the prompt set to the same directory.
What I'm confused about is (1) how to run the scripts, and (2) what goes in
the first line of the script.
For example, if I type "perl hello" from the command line, the "hello"
script executes. Great.
Now the first line of said script is "#!perl". If I *remove* said first
line ("#!perl") and type "perl hello" again, the script *still*
executes. Why? How can it work without that first line identifier?
If I type just "hello" from the command line, I get "bad command or file
name," whether I have that first line or not. (Is it possible to get
*that* to work? How?)
See, it's nice to know that I can omit that first line from my scripts (and
I would love to know why), but what I'd really like is to be able to
execute the script by just typing its name at the DOS window prompt without
"perl" in front of it.
Sorry for such boneheaded questions. Thanks in advance.
--Sandy Santra
More information about the Oakland
mailing list