Created
February 15, 2018 16:04
-
-
Save getkub/5e04ab597d9ea4316473b7788f410008 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# list all of the perl modules installed | |
use File::Find ; | |
for (@INC) { find(\&modules,$_) ; } | |
sub modules | |
{ | |
if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return } | |
return unless /\.pm$/ ; | |
my $fullPath = "$File::Find::dir/$_"; | |
$fullPath =~ s!\.pm$!!; | |
$fullPath =~ s#/(\w+)$#::$1# ; | |
print "$fullPath \n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment