Revision e6738d4be8d4ef42f213921351e7e9df79be7d1a authored by Ben Laurie on 02 February 2004, 15:25:30 UTC, committed by Ben Laurie on 02 February 2004, 15:25:30 UTC
1 parent 4c6d0b7
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/,[ \t]+/,/g;
s/^[ \t]+//g;
s/[ \t]+$//g;
push @words, split ',';
}
}
if (/^=head1 *NAME *$/) {
$name = 1;
}
}
print join("\n", @words),"\n";

Computing file changes ...