What is the difference between library files and modules in Perl?
See Question&Answers more detail:osWhat is the difference between library files and modules in Perl?
See Question&Answers more detail:osIt's all Perl code to perl
. All distinctions are purely idiomatic.
Perl code meant for inclusion that uses a package
directive:
.pm
. Must have this extension for use
to find them.require
, possibly via use
.Perl code meant for inclusion that doesn't use a package
directive:
.pl
.do
.Perl code meant for direct execution by interpreter:
.pl
, or none at all.#!
) line so they can be started without specifying perl
.