2003-01-28 21:43:22 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
$/ = ""; # Eat a paragraph at once.
|
|
|
|
while(<STDIN>) {
|
|
|
|
chop;
|
|
|
|
s/\n/ /gm;
|
|
|
|
if (/^=head1 /) {
|
|
|
|
$name = 0;
|
|
|
|
} elsif ($name) {
|
|
|
|
if (/ - /) {
|
|
|
|
s/ - .*//;
|
2003-10-01 12:32:41 +00:00
|
|
|
s/,[ \t]+/,/g;
|
|
|
|
push @words, split ',';
|
2003-01-28 21:43:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (/^=head1 *NAME *$/) {
|
|
|
|
$name = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print join("\n", @words),"\n";
|
|
|
|
|