Skip to content →

List the perl modules installed on your box

I’m not a hard-core Perl monger, but I recently needed to find out a list of the perl modules (and their version numbers) installed on a box.

I found the following script very useful:


use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";

You can run the above from the command line as follows:

$ perl -e 'use strict; use CGI qw(:standard); use XML::RSS; use ExtUtils::Installed; my $installed = ExtUtils::Installed->new(); my $machine_name = `uname -n`; my $rss = new XML::RSS(version => '2.0'); $rss -> channel(title => "Perl Modules on $machine_name"); $rss -> channel(link => "");foreach my $module ($installed->modules()) {my $version = $installed->version($module) || "???";$rss -> add_item ( title => "$module $version",description => "$module $version",link => "$module",); }print header('application/rss+xml'); print $rss->as_string;'

Finally, if you need to monitor any changes to the PM’s installed, Ben “man in a dress” Hammersley has written a nice little RSS outputter.

Published in Tools Uncategorized


  1. Matt McMillan Matt McMillan

    This method only works for perl modules that have .packlist files installed with them. I noticed that several modules that I know are installed did not show up with this command. I found a perl script called here: . It seems to get around the problem of missing .packlist files.

  2. Scott_CN Scott_CN

    use this command to check one module is installed or not:
    perl -e ‘use File::Compare; print “ok\n”‘

Comments are closed.