mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
23 lines
399 B
Perl
Executable file
23 lines
399 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
my @counts;
|
|
my $nGames = 0;
|
|
|
|
while ( <> ) {
|
|
chomp;
|
|
if ( m|^([A-Z]+) \[| ) {
|
|
my $len = length($1);
|
|
++$counts[$len];
|
|
} elsif ( m|^1:1| ) {
|
|
++$nGames;
|
|
}
|
|
}
|
|
|
|
print "****** out of $nGames games: *****\n";
|
|
print "length num played\n";
|
|
for ( my $i = 2; $i <= 15; ++$i ) {
|
|
printf( "%3d %8d\n", $i, $counts[$i] );
|
|
}
|
|
|