tags:

views:

1145

answers:

4

Hi I'm beginner for perl.

Do you now How to list local installed CPAN modules? like pear list in PHP.

+2  A: 

The answer can be found in the Perl FAQ list.

You should skim the excellent documentation that comes with Perl

perldoc perltoc
Sinan Ünür
A: 

I wrote a perl script just yesterday to do exactly this. The script returns the list of perl modules installed in @INC using the '::' as the separator. Call the script using -

perl perlmod.pl

OR

perl perlmod.pl <module name> #Case-insensitive(eg. perl perlmod.pl ftp)

As of now the script skips the current directory('.') since I was having problems with recursing soft-links but you can include it by changing the grep function in line 17 from

  grep { $_ !~ '^\.$' } @INC

to just,

@INC

The script can be found here.

muteW
+1  A: 

Try man perllocal or perldoc perllocal.

Walter H