programming-examples/perl/Network/Using news group.pl

15 lines
324 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
use News::NNTPClient;
$nntp = new News::NNTPClient('news.yourserver.com');
($first, $last) = $nntp->group("comp.subLang.perl.moderated");
open FILEHANDLE, ">file.txt";
for ($loop_index = $first; $loop_index <= $last; $loop_index++) {
print FILEHANDLE $nntp->article($loop_index);
}
close FILEHANDLE;