http://www.perlmonks.org?node_id=868141

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear all

Please can you tell me how you find all of the perl modules installed under Linux. I have found this command which does list some perl modules in /usr/lib/perl5 and /usr/share/perl5 but I get the error 'Can't stat /usr/local/lib/site_perl: No such file or directory at -e line 1'
My path is /usr/local/lib/perl not site_perl

perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \ 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => +1 }, @INC'
It would also be great to know how to modify that command to show files that match a particular text string

YOur help is much appreciated