#!/afs/athena/contrib/perl/p

$file = "";

if ($#ARGV < 0) {
    print STDERR "No input file specified.\n";
    exit(0);
} else {
    $file = $ARGV[0];
    if (! (open(FH, ("<" . $file)))) {
	print STDERR "Could not open $file for input.\n";
	exit(-1);
    }
}
	
while($line = <FH>) {
    chop($line);

    if ($line =~ /^<PLAINTEXT>$/) {
	next;
    }

    $line =~ s/^poly (.+)$/polygon $1/;

    print ($line . "\n");
}
