The shebang line, contrary to what has already been stated, is not used by the Unix shell but by the execve system call - as per the execve(2) manpage:
execve() executes the program pointed to by filename. filename must be
either a binary executable, or a script starting with a line of the
form "#! interpreter arg". In the latter case, the interpreter must
be a valid pathname for an executable which is not itself a script,
which will be invoked as interpreter arg filename.
Windows uses another mechanism based on the extension of the file to determine how to execute the file, however
Perl does take note of the shebang line however the program was invoked: if there is a shebang line and it contains "perl" then it will be parsed to determine any additional command line switches that may need to be applied - if
perl finds a shebang lime that doesn't contain "perl" then it will attempt to re-execute the script using the "interpreter" found there - thus on windows you can create a file with a shebang line
#!notepad and run it with perl then "notepad" will be started with your "script" open for editing.
/J\