#!/local/bin/perl use News::NNTPClient; $c = new News::NNTPClient; $pat=shift; @groups=$c->xgtitle("comp.sys.sgi.*"); # all the perl groups open(OUTPUT, ">/home/nem/out"); for (@groups) { ($group,$info)=split(' ',$_); ($first,$last)=$c->group($group); for ($first..$last) { ($art,$junk)=split(' ',$_); @art=$c->article($art); print OUTPUT @art, "\n" if grep(/$pat/o,@art); } } close(OUTPUT); __END__