in reply to Talking to NNTP server
Here is the code that I am using.. I try to go with Newsrc file. I think it's the best option.
use News::NNTPClient; use News::Newsrc; use strict; use warnings; my $newsrc = News::Newsrc->new("localfile"); my $ok = $newsrc->load("localfile"); my $server = 'myserver'; my $group = q(group); my $client = News::NNTPClient->new($server) my ($low,$high) = $client->group($group); my @unmarked = $newsrc->unmarked_articles($group,$low,$high); foreach my $artnum (@unmarked){ my $art = $client->article($artnum) or next; print $art,"\n"; $newsrc->mark($group,$artnum); } $newsrc->save_as("localfile")
|
|---|