1234567891011121314
use File::Find ();foreach my $root (@INC) { &File::Find::find( sub { return unless /\.pm/; my $module = $File::Find::name; $module =~ s/^\Q$root\E\/(.+)\.pm/$1/ and $module =~ s/[\/\\]/::/g and print $module. "\n"; }, $root );} # foreach