2002-11-29 15:00:58 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
$/ = ""; # Eat a paragraph at once.
|
|
|
|
while(<STDIN>) {
|
|
|
|
chop;
|
|
|
|
s/\n/ /gm;
|
|
|
|
if (/^=head1 /) {
|
|
|
|
$name = 0;
|
|
|
|
} elsif ($name) {
|
|
|
|
if (/ - /) {
|
|
|
|
s/ - .*//;
|
2004-03-25 19:52:34 +00:00
|
|
|
s/,\s+/,/g;
|
|
|
|
s/\s+,/,/g;
|
|
|
|
s/^\s+//g;
|
|
|
|
s/\s+$//g;
|
|
|
|
s/\s/_/g;
|
2003-06-11 19:44:37 +00:00
|
|
|
push @words, split ',';
|
2002-11-29 15:00:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (/^=head1 *NAME *$/) {
|
|
|
|
$name = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print join("\n", @words),"\n";
|
|
|
|
|