#!/usr/local/bin/perl -w use strict; use File::Find; find { wanted => sub {print if /\.pm$/}, no_chdir=>1} $dir foreach my $dir (@INC); #### # same guidelines as above, use strict and that ilk my %been_at; sub wanted { return if $been_at{$dir}; $been_at{$dir} = 1; print if /\.pm$/; } find { wanted => \&wanted, no_chdir => 1 } $dir foreach my $dir (@INC);