# use strict and the ilk above 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;