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.