Pasi Valkeila wrote:
Hello!
I´m trying to run a script that uses Net::FTP and I get a "Can't locate
FTP/Net.pm in @INC..."
That appears to be backwards (could be your typo). Should be Net/FTP.pm .
What does your use stmt look like ?
How can I get a list of the modules installed on the server that I'm using?
#!perl -ws
use strict;
use vars qw($e $h);
my $usage = <<EOD;
Usage: $0 [-e]
-e use ExtUtils::Installed instead of File::Find
EOD
print $usage and exit if $h;
if ($e) {
use ExtUtils::Installed;
my $inst = ExtUtils::Installed->new();
my @modules = $inst->modules();
foreach my $module (@modules) {
print $module, "\n";
}
exit 0;
}
use File::Find;
my (@found, @pms);
for (@INC) {
next if /^\.\.?/;
&finddepth (sub { push @found, $File::Find::name if -d }, $_);
}
for my $dir (@found) {
opendir DIR, $dir or die $!;
my @files = grep /\.pm$/, readdir DIR;
closedir DIR or warn $!;
for (@files) {
push @pms, "$dir/$_\n";
# push @pms, "$_\n" if you want just the module names
}
}
print sort @pms;
__END__
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:dbe@;todbe.com
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs