logos

With Andrii Grytsenko


Technical Diary - With Andrii Grytsenko

Check if the perl module is installed

Under cover you can find some trick and script to check perl module installation.

To figure out whether perl module is installed at the system. Run:

perl -M<module_name> -e 1

if command return an error or NOT 0(zero) then module is not installed at the moment.

Here is also perl script which help you check a lot of modules:

#!/usr/local/bin/perl

my @modules = qw (put your modules here separated by space without any quotes);

foreach my $module (@modules){
print $module,"\t";
my $result=system("perl -M$module -e 1");
print "Installed" if (!$result);
print "\n";
}

EOF

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Security Code: