On Friday, November 29, 2002, at 09:19  PM, Ken Williams wrote:

I see that in MacPerl (not perl for OS X), $Config{startperl} is set to

"Perl -Sx \"{0}\" {\"Parameters\"}; Exit {Status}\n#!perl"

in Config.pm . I'm not sure what that extra stuff is before the shebang, but when I run a script that contains that (using MacPerl 5.6.1), I just get a perl syntax error. When I remove it, all is > well.

Can anyone enlighten about what that first line is for?
That line is a MacPerl compatibility with MPW (Macintosh Programmer's Workshop), the old Mac development environment. According the MacPerl book, this line allow scripts to be called directly from MPW without the need to call the Perl tool directly. MacPerl knows to ignore this line, but Mac OS X perl does not.

I think it is safe to leave it out (and only include the appropriate shebang line), as if anyone is still using MPW, they are probably used to adding that line to Perl scripts.
------------------------------------------------------------------------ --
Edward Moy
Apple Computer, Inc.
[EMAIL PROTECTED]

(This message is from me as a reader of this list, and not a statement
from Apple.)



Reply via email to