Re: PLEASE: A little program to get news (Net::NNTP)

Austin S. Lin (austin@al2.com)
Fri, 5 Dec 1997 04:49:11 -0500 (EST)


Hi Mannina,

I don't _think_ retrieving a list of articles from a newsgroup is
implemented in LWP yet.  This is probably best solved by using Net::NNTP
which is available at:

  ftp://ftp.ibp.fr/pub/perl/CPAN/modules/by-module/Net/libnet-1.0603.tar.gz
  http://www.perl.com/CPAN/modules/by-module/Net/libnet-1.0603.tar.gz

A simple version of your program might look something like:
  #!/usr/bin/perl -w
  use Net::NNTP;

  my $nntp = Net::NNTP->new('your.nntp.server.fr');
  my @articles = @{$nntp->newnews(time - 3600, 'fr.comp.os.linux')};
  foreach my $article (@articles) {
      print "Article $article:\n";
      print @{$nntp->article($article)};
  };

- Austin S. Lin
  austin@AL2.com

On Fri, 5 Dec 1997, mannina bruno wrote:

> e.g :
> Param1 = name_of_news  (fr.comp.os.linux)
>