Skip to content

Instantly share code, notes, and snippets.

@reneeb
Created October 24, 2013 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reneeb/7137717 to your computer and use it in GitHub Desktop.
Save reneeb/7137717 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use IO::File;
use IO::Dir;
my $base_dir = '/root/.cpanm/work/';
my $dh = IO::Dir->new( $base_dir );
while ( my $dir = $dh->read ) {
next unless $dir =~ m{\A\d+\.\d+\z};
my $build = IO::File->new( $base_dir . $dir . '/build.log', 'r' );
while ( my $line = <$build> ) {
my ($perl) = $line =~ m{on perl (\d+\.\d+)};
if ( $perl ) {
print "$dir -> $perl\n";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment