Initializing the NNTP Client

To use Net::NNTP, create a new Net::NNTP object:

use Net::NNTP; 
$nntp = Net::NNTP->new;   # Use default port and options

Once you’ve created the object, you can use any of the Net::NNTP methods on that object. The Net::NNTP methods generally parallel the functionality of the raw NNTP commands. Your news client can be written to perform many functions, including:

  • Authenticating a user to the server

  • Listing available newsgroups

  • Retrieving news headers and articles

  • Extracting headers

  • Checking for new articles

  • Posting articles

  • Listing information such as active messages in a newsgroup, new newsgroups, valid distribution areas, or message IDs of newly arrived messages

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.