in reply to Perl thinks it's the shell!
From perlrun,
If the #! line does not contain the word ``perl'', the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don't do #!, because they can tell a program that their SHELL is /usr/bin/perl, and Perl will then dispatch the program to the correct interpreter for them.
Also, I believe Apache uses the #! line rather the file association.
On a related note, (again from perlrun)
The #! line is always examined for switches as the line is being parsed. Thus, if you're on a machine that allows only one argument with the #! line, or worse, doesn't even recognize the #! line, you still can get consistent switch behavior regardless of how Perl was invoked, even if -x was used to find the beginning of the program.
so -w and other switches on the #! line will work in Windows, even though Windows doesn't know about the #! line.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl thinks it's the shell!
by misterw (Acolyte) on Jun 02, 2005 at 05:23 UTC | |
by monsieur_champs (Curate) on Jun 02, 2005 at 12:55 UTC | |
by omega_monk (Scribe) on Jun 02, 2005 at 11:39 UTC | |
by misterw (Acolyte) on Jun 03, 2005 at 05:32 UTC | |
Re^2: Perl thinks it's the shell!
by Stoffe (Sexton) on Jun 02, 2005 at 19:01 UTC | |
by Phaysis (Pilgrim) on Jun 03, 2005 at 14:32 UTC |