in reply to Re: Re: Stuff and Things
in thread Stuff and Things

Nope, having a fake #! line will cause a fatal error, even if you invoke perl explicitly: perl poem.pl because Perl detects the #! line and tries to exec the specified command, just like a shell would do: Can't exec Ambiguity! at poem.pl line 1. This is documented in 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.

Replies are listed 'Best First'.
Re: Re: Re: Re: Stuff and Things
by premchai21 (Curate) on Mar 02, 2001 at 04:32 UTC
    Hmm... doesn't seem to work that way for me... must have a non-standard interpreter or something. In any case, thanks, and fixed.