in reply to Command line option to list all modules?

I believe there's another, more standard, way to do it, but this should do what you want:
use File::Find; $|++; find sub { print "$File::Find::name\n" if $_ =~ /\.pm$/ }, @INC;
Of course, if you don't have File::Find, try:
$|++; while (@INC) { my $dir = shift @INC; opendir(MODDIR, $dir) or die "opendir $dir: $!"; @allfiles = readdir MODDIR; foreach (@allfiles) { $file = "$dir/$_"; next if $_ eq '.' or $_ eq '..'; unshift @INC, $file if -d $file; print "$file\n" if $_ =~ m/\.pm$/; } closedir MODDIR; }

-- Frag.

Replies are listed 'Best First'.
(ichimunki) Re x 2: Command line option to list all modules?
by ichimunki (Priest) on Aug 10, 2001 at 23:40 UTC
    If you don't have File::Find, you might consider upgrading to a more recent version of Perl 5 (like, 1996 or later), File::Find is a core module. =)