Revision 6bd61198fb28b454090890f8efd3f86adf8773cc authored by Dr. Stephen Henson on 20 November 2012, 00:29:09 UTC, committed by Dr. Stephen Henson on 20 November 2012, 00:29:09 UTC
1 parent 23b5e47
extract-names.pl
#!/usr/bin/perl
$/ = ""; # Eat a paragraph at once.
while(<STDIN>) {
chop;
s/\n/ /gm;
if (/^=head1 /) {
$name = 0;
} elsif ($name) {
if (/ - /) {
s/ - .*//;
s/,\s+/,/g;
s/\s+,/,/g;
s/^\s+//g;
s/\s+$//g;
s/\s/_/g;
push @words, split ',';
}
}
if (/^=head1 *NAME *$/) {
$name = 1;
}
}
print join("\n", @words),"\n";

Computing file changes ...