#!/usr/bin/perl $/="------------------------------------------------------------------------"; while (<>) { if (($m, $d)=/r\d+ \| ([^|]+) \| (\d+-\d+-\d+)/) { $d=~s/-\d+$//; my $alltrans=1; while (/ M (.*)/sg) { if (! /\.po/ && ! (/manual\/(\w\w)/ && $1 ne 'en')) { $alltrans=0; } } if ($alltrans) { $pocount{$d}++; } $count{$d}++; } } my @list=sort keys %count; pop @list; # remove last, probably incomplete month foreach my $d (@list) { print "$d, $count{$d}, ".(defined $pocount{$d} ? $pocount{$d} : '0')."\n"; }