From: UENO Kazuaki Date: 2001-02-23T18:23:42+09:00 Subject: [ruby-list:28187] Re: handling of #! > From: "Takahiro Kambe" Sent: Thursday, February 22, 2001 10:15 PM > > なんか不思議な機能ではあるんですけどねぇ。例えば /bin/sh あたり に組 > > み込まれてるんなら納得いくんですけど、ENOEXEC でデフォルト Perl を 呼び > ええ、僕もそう思います。 perldoc 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. [snip] 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. たいていの場合余計なお世話であるようには思います。