Help - Search - Members - Calendar
Full Version: Perl Help
Linuxhelp > Support > Technical Support
cbarone
Hello,

I just installed Perl, DBI and the Oracle DBD driver. Is there a command to tell exactly what perl modules are installed on your system?

Thanks for your help in advance.

Regards,

Cbarone@dca.net
hughesjr
Add this code to a file (I named it list_mods.pl)
CODE
#!/usr/bin/perl -w

use strict;
use CGI qw/:standard/;
use File::Find;

print header,
start_html,
h1("Perl Environment: $ENV{SERVER_NAME}"),
p("Perl Version: $]"),
p("CGI.pm Version: $CGI::VERSION"),
p("Library Path (\@INC):"),
ul(li([@INC])),
p('Modules:');

foreach my $dir (@INC) {
my @mods;
find(sub { push @mods, $File::Find::name if /\.pm$/ }, $dir);
print ul(li("$dir"), ul(li([sort @mods])));
}


Then run it like this:

perl list_mods.pl > list_mods.html

Open list_mods.html with your web browser...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.