# Find all articles in 'comp.lang.perl.announce' # that were posted in the last 24 hours $news = $nntp->newnews( time - 86400, 'comp.lang.perl.announce') or die "Cannot get newnews: $!"; foreach $msgid (@$news) { # Get the text of the article $article = $nntp->article($msgid) or die "Cannot get '$msgid': $!"; # Save the text in a file ($file = $msgid) =~ s/[\/\$]/_/g; open(ARTICLE, ">$file") or die "Cannot open $file: $!"; print ARTICLE @$article; close(ARTICLE); }