I think this
almost what you want ...
#!/usr/bin/perl -w
use strict;
$_ = <DATA>;
my @matches = /([A-Z].*? )[a-z].*?/g;
my $biggest = 0;
my $biggestCluster;
for my $m ( @matches ) {
print "$m\n";
$_ = $m;
my @cs = /([A-Z].*? )/g;
if ( $#cs > $biggest ) {
$biggestCluster = $m;
$biggest = $#cs;
}
}
print "Biggest Cluster is [$biggestCluster]\n";
__DATA__
Douglas built five Douglas World Cruisers to attempt his first flight
+to Buenos Aires. There were the predecessor of the modern AH-64D and
+AH-64D Apache.
... it has a problem picking up AH-64D Apache, but hopefully you will still find this somewhat helpful.