It might be helpful to specify which first line.
To fill in that blank, the first line that isn't necessary is the shbang line (the one that starts with #!/...) at the top of the module's source. It is necessary at the top of the main program's source, however.
While we're at it, let's give a reason so that in the future it's easier to remember: The operating system needs to know what program to use to interpret the lines of code that follow. One could specify #!/bin/sh for a shell script, for example. But for a Perl script, we want to direct the operating system to our installed Perl interpreter.
Since it is the main program that is invoked by the user as an executable command, that is where the shebang needs to be located. That's the only point where the operating system wouldn't know what to do, if the #!/... line weren't there. Once the main program is invoked and the Perl interpreter is fired up, perl handles calling and executing the modules. perl already knows where it lives, and doesn't need for the modules to specify a location. Luckily since the line is set up to look like a comment, it's just ignored when it appears at inappropriate places.
|