Perl Modules


We’ll refer below to Perl Modules. When we talk about modules we refer to some well-structured components of the system, which have an interface defined to some other components of the system. Starting with the fifth version, Perl provides you thousands of modules available through CPAN (Comprehensive Perl Archive Network) or other resources.

What is a Module?

A module is a piece of code that others have already written, code that you can use and integrate into your own Perl script in order to save a lot of time. You can design your own modules in order to optimize your code or use modules made by others. Refactoring the source code by creating your own modules is beyond the scope of this page, so we’ll discuss here only the opportunities you have in implementing the modules available at a certain moment on different platforms.

Perl Modules

Reusing a Code is always a Good Idea

It is very probable that, if you have a problem to code into your script, there is somebody who has already solved and made it available on CPAN, so reusing code through a module interface is always a good idea.

Types of Perl Modules

There are two types of Perl modules: those that are distributed with Perl which you can use immediately after the Perl installation, and those you can download from CPAN or other sources and install yourself. Each module available on CPAN has a detailed documentation which you can read before downloading the entire package and see for yourself if it’s what you are looking for.

Some modules depend on other modules, so please read carefully the associated documentation before you download and install them.

In order to use a module, it’s not necessary to know how all of the behind-the-scenes magic works, it’s only important to understand its interface and know its functions or subroutines.

To find modules that are not distributed with Perl you can start browsing through the CPAN categories or search Google or some other search engines directly.


Click for the information on DBI Perl Module.

Leave a Reply

Your email address will not be published. Required fields are marked *