On Thu, 2003-12-18 at 06:03, Ajey wrote:
> hi,
> how can i find which perl modules are installed on linux os?

Well Linux distributions differ in what they install, and even then you
can install or uninstall or change what modules are installed yourself,
so pretty much you're never guaranteed that any module is installed. 
Even if a module is part of the Core installation (i.e. the module
defaults to installation with perl), your @INC can be modified to
exclude it.

So run the following script:

#! /usr/bin/perl

use strict;
use warnings;
my @dirs = @INC;
while (my $dir = shift (@dirs)) {
  my @modules = glob "$dir/*.pm";
  while (my $module = shift (@modules)) {
   my @parts = split '/', $module;
   my $module = pop (@parts);
   print "Module $module is installed\n";
  }
}

print "That's all \n\n";




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to