Created
April 16, 2009 06:52
-
-
Save zigorou/96276 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 | |
use strict; | |
use warnings; | |
use ExtUtils::Installed; | |
local $\ = "\n"; | |
my $ptn = shift @ARGV || ''; | |
my @modules = ExtUtils::Installed->new->modules; | |
unless ($ptn) { | |
print join "\n" => sort @modules; | |
} | |
else { | |
my $regex = qr{$ptn}; | |
print join "\n" => sort grep { m|$regex|xoi } @modules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment