Code: Select all
#!/usr/bin/perl
#
# This was found in a newsgroup. It lists
# installed perl modules.
#
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}
Code: Select all
./list_perl_mod.pl
Perl -- 5.16.3
yum -y install perl-MIME-Lite
./list_perl_mod.pl
Perl -- 5.16.3