Saturday, January 7, 2012

Command-line to check the details of Perl modules installed on Linux

To find the path of Perl modules installed:  
# perl -e 'print join "\n", @INC'

To find the path of each individual Perl modules:
# find `perl -e 'print "@INC"'` -name '*.pm' -print

To check if a given Perl module is installed on the system:
Let say you want to check if the Perl module "File::Compare" is installed or not. The syntax would be as follows:
# perl -e 'use File::Compare; print "Installed\n"'
Installed
#

No comments:

Post a Comment