CUFP
crazyinsomniac
snippet
<div class="Description">Based on [vroom]'s suggestion(someplace), this script recurses through the directories in @INC, and prints out a list of files found there. You can also print only files ending in '.pm', that's why the 2 subroutines. I did this recently because my host throws an error at `[perldoc] perllocal`. (<font color=red>update:</font> hmm, maybe I would have had better luck with `[perlman] perllocal`)</div>
<CODE>
sub whats_installed
{
require File::Find;
for my $ix(0..$#INC)
{
print $INC[$ix], "\n";
File::Find::find(sub { print $File::Find::name, "\n"},$INC[$ix]);
}
}
sub whats_installed2
{
require File::Find;
for my $ix(0..$#INC)
{
print $INC[$ix],"\n";
File::Find::find( sub {substr ($_, -3) eq '.pm' && print $File::Find::name, "\n";}, $INC[$ix]);
}
}
</CODE>