blob: c7f2cedad45d95b773393fc50383d0c0203e8e89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
my @WorkingTPM = qw(
enter the current list of working tpm from
tpm-ctan-check here before calling this script
then copy the output back to tpm-ctan-check
);
my @foo = sort {uc($a) cmp uc($b)} @WorkingTPM;
print_foo(@foo);
sub firstletter {
my ($bar) = @_;
my @foo = split //, $bar;
return(uc($foo[0]));
}
sub print_foo {
my(@foo) = @_;
my $newletter = 1;
my $curline = "";
my $curletter = "";
my $initshift = " ";
my $medshift = " ";
foreach $t (@foo) {
my $fl = firstletter($t);
if ($fl eq $curletter) {
if (length($curline) + 1 + length($t) >= 70) {
print "$curline\n";
$curline = "$initshift$medshift$t";
} else {
$curline .= " $t";
}
} else {
print "$curline\n";
$curline = "$initshift$t";
$curletter = $fl;
}
}
print $curline;
}
|