#!/usr/local/bin/perl -w use strict; my $file = "/export/home/limo/newsgroups"; my $newfile = "/export/home/news/newfile.html"; my $altfile = "/export/home/news/altfile.html"; my $biofile = "/export/home/news/biofile.html"; my $bizfile = "/export/home/news/bizfile.html"; my $comfile = "/export/home/news/comfile.html"; my $gnufile = "/export/home/news/gnufile.html"; my $govfile = "/export/home/news/govfile.html"; my $k12file = "/export/home/news/k12file.html"; my $micfile = "/export/home/news/micfile.html"; my $newfile = "/export/home/news/newfile.html"; my $govfile = "/export/home/news/govfile.html"; my $otherfile = "/export/home/news/otherfile.html"; my $ng = "newsgroups"; use vars qw ($line $dsc $grp $title $blurb $header $footer $head); use vars qw (%alt %bio %bit %biz %com %gnu %gov %k12 %mic %new %other %rec %sci %soc %tal %vms); ############################################## $header = <
>$altfile" || die "$!\n"; while ($line = ) { chomp $line; if ($line =~ /(.*?)\s+(.*$)/) { $grp = $1; $dsc = $2; if ($grp =~ /^alt/) { $alt{$grp} = $dsc; $title = "alt.* $ng";} elsif ($grp =~ /^bio/) { $bio{$grp} = $dsc; $title = "bionet.* $ng" ;} elsif ($grp =~ /^bit/) { $bit{$grp} = $dsc; $title = "bit.* $ng" ;} elsif ($grp =~ /^biz/) { $biz{$grp} = $dsc; $title = "biz.* $ng" ;} elsif ($grp =~ /^com/) { $com{$grp} = $dsc; $title = "comp.* $ng" ;} elsif ($grp =~ /^gnu/) { $gnu{$grp} = $dsc; $title = "gnu.* $ng" ;} elsif ($grp =~ /^gov/) { $gov{$grp} = $dsc; $title = "gov.* $ng" ;} elsif ($grp =~ /^k12/) { $k12{$grp} = $dsc; $title = "k12.* $ng" ;} elsif ($grp =~ /^mic/) { $mic{$grp} = $dsc; $title = "microsoft.* .$ng" ;} elsif ($grp =~ /^new/) { $new{$grp} = $dsc; $title = "news.* $ng" ;} elsif ($grp =~ /^rec/) { $rec{$grp} = $dsc; $title = "rec.* $ng" ;} elsif ($grp =~ /^sci/) { $sci{$grp} = $dsc; $title = "sci.* $ng" ;} elsif ($grp =~ /^soc/) { $soc{$grp} = $dsc; $title = "soc.* $ng" ;} elsif ($grp =~ /^tal/) { $tal{$grp} = $dsc; $title = "talk.* $ng" ;} elsif ($grp =~ /^vms/) { $vms{$grp} = $dsc; $title = "vmsnet.* $ng" ;} else { $other{$grp} = $dsc; }}} ##################################################### $head = <$title

HEAD ; ##################################################### $blurb = <Name a topic, and it's in here. The rules for creating an alt.* newsgroup are easier than the procedures in the Usenet hierarchies, so new groups appear all the time.

At myco, we generally don't take every new alt.* group that is created out on the net, so submit a request if you'd like access to an alt.* group you've heard about.

BLURB ; print ALTFILE $header; print ALTFILE $head; print ALTFILE $blurb; foreach my $key (sort keys %alt) { print ALTFILE <$key\<\/a\>
$alt{$key}
ALT ; } print ALTFILE $footer;