Perl: Modules

By Xah Lee. Date: . Last updated: .

Modules Filename Extension

The standard filename suffix for perl module is “.pm”.

Load a Module

To load a package, call use module_name;. It imports all functions in that package.

# loading some commonly used packages
use Data::Dumper;   # for printing list and hash
use File::Find;
# for traversing directories

Show Module Documentation

To find out what functions are available in a module, read its documentation, for example perldoc Data::Dumper.

Perl Module