in reply to Re^3: Shebang Inside the coding ?
in thread Shebang Inside the coding ?
So, to make things equal, perl will pay attention the the first line - if it's a shebang line, it will look which command follows the shebang line. If it doesn't look like a perl, it will start this command, else it will look which options have been passed.
It's also not a matter of re-reading. It has to read the first line anyway. (Other interpreters would just discard the first line - it's not a coincidence that interpreters (*) line Perl, shells and Python use the # as their comment character.
(*) Called interpreter because they can read a program on their STDIN and execute it.
|
---|