Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Check Which Perl Modules Are Installed

This guide shows simple ways to list the Perl modules on your server and to check for one module.

Web Hosting2 min read6 steps1 screenshots

What is a Perl module?

Perl is a programming language. Many scripts on web servers use it. A module is a ready-made add-on that gives Perl a new skill, like a tool you add to a toolbox. For example, a module can help a script send email or read a database. If a script needs a module that is missing, it shows an error.

Check if one module is installed

  1. Connect to your server with SSH. SSH is a safe way to type commands on a remote computer.
  2. Run this command. It tests the module called DBI:
perl -MDBI -e 'print "DBI is installed\n"'

If the module exists, you see the message. If not, Perl says it cannot locate the module.

  1. Show the version of the module:
perl -MDBI -e 'print $DBI::VERSION . "\n"'

This prints the version number.

Replace DBI with the name of the module you want to test.

List all installed modules

  1. Run this command:
perldoc perllocal

This lists modules that were installed from CPAN, which is the big online library of Perl modules. It may be empty if modules came from your system packages.

  1. For a fuller list, use this command:
find `perl -e 'print "@INC"'` -name '*.pm' -print

This searches all Perl folders for module files. They end with .pm. The list can be long.

  1. To save the list in a file, add this at the end:
find `perl -e 'print "@INC"'` -name '*.pm' -print > modules.txt

This writes the result into modules.txt.

Using cPanel

If your hosting has cPanel, look for the Perl Modules icon under the Software section. It shows installed modules and lets you search. It is not on every plan. Ask Hostvento support if you cannot find it.

See where Perl looks

perl -e 'print join("\n", @INC), "\n"'

This prints the folders where Perl searches for modules.

perl modules
Tip: If a module is missing on shared hosting, open a support ticket and ask for it. On a VPS you can install it yourself with cpan.

Quick recap

  • Perl modules are add-ons for Perl scripts.
  • Use perl -MName -e to test one module.
  • Use find with @INC to list all.
  • cPanel may have a Perl Modules page.