Skip to content

Instantly share code, notes, and snippets.

@bingos
Created July 9, 2019 18:54
Show Gist options
  • Save bingos/67386c4253fa44501f7e9b8035a4b9d8 to your computer and use it in GitHub Desktop.
Save bingos/67386c4253fa44501f7e9b8035a4b9d8 to your computer and use it in GitHub Desktop.
Counting underscore prefixed packages
use 5.012;
use strict;
use warnings;
$|=1;
my $start;
while (<>) {
chomp;
if ( !$_ ) {
$start = 1;
next;
}
next if !$start;
my ($pack,$ver,$dist) = split ' ';
my @packs = split m!\:\:|\'!, $pack;
say $_ if grep { m!^\_! } @packs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment