-----Original Message-----
From: SPENCERS [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 28, 2003 12:37 PM
To: Harry Putnam
Subject: RE: find uniq paths in @INC
Hello, Harry.
Is this what you are looking for?
#!/usr/bin/perl -w
# list all of the perl modules installed
use strict;
use File::Find ;
for (@INC) { find(\&modules,$_) ; }
sub modules
{
if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return }
return unless /\.pm$/ ;
my $fullPath = "$File::Find::dir/$_";
$fullPath =~ s!\.pm$!!;
$fullPath =~ s#/(\w+)$#::$1# ;
print "$fullPath \n";
}
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Harry Putnam
Sent: Saturday, June 28, 2003 11:12 AM
To: [EMAIL PROTECTED]
Subject: find uniq paths in @INC
I've stumbled around with this before and someone posted something
that came close but still doesn't quite do what I want.
Maybe it isn't important enough to get this involved with it.
Here is the problem:
Summary run home made tools against only the uniq paths that might contain
perl *.pm files.
In my case:
$ perl -e 'print $newINC = join("\n",@INC),"\n";'
/usr/local/lib/perl5/5.8.0/i686-linux
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/Text
/usr/lib/perl5/vendor_perl/5.6.1
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/vendor_perl/5.6.1/i386-linux
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]