Skip to content

Instantly share code, notes, and snippets.

@zigorou
Created April 16, 2009 06:52
Show Gist options
  • Save zigorou/96276 to your computer and use it in GitHub Desktop.
Save zigorou/96276 to your computer and use it in GitHub Desktop.
#!/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