Module names must be unique. To minimize name space collisions, Perl provides a hierarchal name space for modules, similar to the name space for Java classes. The module name hierarchy doesn't have anything to do with class inheritance. Module files Each module is contained in a single file. Module files are stored in a subdirectory hierarchy that parallels the module name hierarchy.
All module files have an extension of .pm .
You may also encounter .pl files. The Perl interpreter has a list of directories in which it searches for modules. As installed on my machine, the Perl interpreter looks for modules in five places. The last is the current working directory . Local and standard modules are separated in this way so that a new release of the interpreter can replace the standard modules without disturbing the locally installed ones.