With the exception of the '-e' option point that you mentioned, I think what I was trying to say ( I guess poorly ) is what you said - very eloquently, I might add - in your summary. Thanks for the info! :-)
> Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm), formerly Harbinger and Extricity > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] > -----Original Message----- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 3:27 PM To: Tony Esposito; [EMAIL PROTECTED] Subject: RE: Which Perl is used to run the script??? Tony Esposito wrote: > So if I understand you correctly, if the line > > #!/usr/bin/perl > > exists in your Perl program, then that Perl is used regardless. No. That program is only used if your script is started by the kernel. This is called an "interpreter file" and the behavior is documented in the execve(2) manpage. If *you* start a perl executable and pass your script to it, the program on this line is ignored, and the perl you started executes the script. > > And if it is missing, then > > perl -e myperl You *still* wouldn't use -e here. > > will use the first Perl environment that is found in the environment > $PATH. The first perl found on the path will be started and will execute your script. The program specified on the #! line (if any) is ignored. To summarize: ./foo.pl <-- runs the script using the perl named in the #! line. script must be chmod +x. perl foo.pl <-- runs the script using first perl in the PATH. any program named on the #! line is ignored. script need not be chmod +x. /bin/perl foo.pl <-- runs the script using /bin/perl. PATH is ignored, and any program named on the #! line is ignored. script need not be chmod +x. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]