#!/usr/bin/perl -w use strict; use File::Find; my $re = shift || "."; find sub { return unless my ($x) = $File::Find::name =~ m{\./(.*\.pm)$}; $x =~ s,/,::,g; print "$x\n" if /\Q$re\E/i; }, map "$_/.", grep -d && /^[^.]/, @INC;