Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Perl Help, Perl Question
cbarone
post Dec 17 2003, 08:50 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 17-December 03
Member No.: 1,979



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
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 18 2003, 11:29 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th October 2017 - 05:14 PM