in reply to Re: On running perl scripts
in thread On running perl scripts

The #!/usr/bin/perl (often called the shebang line) tells a *NIX shell to load the given interpreter when it tries to execute a file.

To be pedantic it is not the shell that is doing this - it is the execve(3) system function, which should be available in any POSIX compliant system.

/J\

Replies are listed 'Best First'.
Re^3: On running perl scripts
by Random_Walk (Prior) on Feb 07, 2005 at 15:26 UTC

    Pedantic is apropriate here.

    So when you flag flag a file executable the shell just chucks it to execve(3) without bothering to look inside. execve(3) then does the magic number, er, magic.

    I do love this Monastery, you really do learn a new thing every day here

    Thanks,
    R.

    Pereant, qui ante nos nostra dixerunt!