";
}else{
if($topic eq ""){
$topic="unclassified";
}
if($nick eq ""){
$nick="nobody";
}
if($title eq ""){
$title=$url;
}
my $date=`date -I`;
my $time=`date`;
my $newtopic;
$time=~ s/.*\s(\d\d:\d\d:\d\d)\s.*/$1/g;
my $infilen="/usr/local/httpd/apache/htdocs/calendar/links/index.xml";
my $outfilen="/usr/local/httpd/apache/htdocs/calendar/links/tmp.xml";
my $bkn="/usr/local/httpd/apache/htdocs/calendar/links/links.bk";
open (IN,"$infilen") or die "oops";
open (OUT,">$outfilen");
open (BK,">>$bkn");
my $firsttest="";
my $testy=`grep "$firsttest" $infilen`;
if($testy ne ""){
# print "...ok";
}else{
$newtopic=$topic;
$topic="xxx";
# print ".NOT..ok";
}
my $test="";
while(){
if(/$test/){
#print "\ngot it!\n";
print OUT "
\n";
if($newtopic ne ""){
print OUT "\n$newtopic\n";
}
print OUT "\n
$url$nick$title
";
if($newtopic ne ""){
print OUT "$newtopic";
}
if($topic ne ""){
print OUT "$topic";
}
if($blurb ne ""){
print OUT "$blurb\n";
}
print OUT "\n";
# }
}else {
print OUT $_;
}
print BK $_;
}#end while
close(IN);
close(OUT);
print `mv /usr/local/httpd/apache/htdocs/calendar/links/tmp.xml /usr/local/httpd/apache/htdocs/calendar/links/index.xml`;
print `./2html`;
print `./2rss`;
print ("