in reply to Perl Directive

It serves two purposes under Unix, and one under Windows. On Unix, executable files starting with #! are run with whatever comes after the #! (pronounced "shebang") as their interpreter. Once Perl starts up, it looks at this first line again, and adds in any command-line options from this line it doesn't already have.

Replies are listed 'Best First'.
Re^2: Perl Directive
by ikegami (Patriarch) on Dec 13, 2004 at 05:59 UTC
    Furthermore, perl will launch the specified program with the script as input if it doesn't see "perl" in the commmand. This was discussed here.