programming-examples/perl/Network/Using news group.pl
2019-11-15 12:59:38 +01:00

15 lines
324 B
Perl

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;