ahakim has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I'm working on a perl script which downloads the messages from a newsgroup and writes them to a file. I'm having trouble extracting the message number. A code snippet:
@fields = qw(numb subj from date mesg refr char line xref); foreach $xover ($client->xover($client->newnews("$group",$current_time + - 3600))) { %fields = (); @fields{@fields} = split /\t/, $xover; print MESSAGES "Article: $fields{numb} of $group\n"; print MESSAGES $client->article($fields{numb}); print MESSAGES "\n"; $art_num++; }
Everytime I try to run this code, I get an error saying "NNTPERROR: 500 not implemented NNTPERROR: 500 command not recognized " Anybody have any ideas for me? thanks.

Replies are listed 'Best First'.
Re: need help using NNTP
by Fletch (Bishop) on Aug 12, 2006 at 00:03 UTC

    Maybe like the error says, your NNTP server doesn't implement the XOVER command? It's an extension to the NNTP protocol and not required, so that's not surprising.

      I thought that might be the problem too, but the following line of code works:  foreach $xover ($client->xover($client->group("$group"))) My basic assumption is that if xover works on all the messages in the group, it should work on a subset of messages, in this case the newest ones. Ali