How to find Perl modules available in Linux

In a perl script, I see the below given Perl modules used in a script. Now I want to use this same script in another server.  How can I check if these modules are already available on other server?
I know if these Perl modules aren't available, it will give error while executing. But I just want to know the command line to search for availability of Perl modules on a server.

use XML::Simple;
use Data::Dumper;

[loguser@logllm01 ~]$ perl -e 'print join "\n", @INC'      =>  This just gives me the path where perl modules are located but I can't do search in this.
.[loguser@logllm01 ~]$
Who is Participating?
TintinConnect With a Mentor Commented:
Lots of different ways of doing this (as is perl's way)

Simplistically, you can do

perl -MXML::Simple -e1


perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'

or depending on your perl version and platform, the following might work

perldoc perllocal

cpan -l

Abhishek_ChibConnect With a Mentor Commented:

Follow instruction on  :

Section : How do I find out what modules are already installed on my system?
ashsysadAuthor Commented:
Thankyou so much !
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.