R
ruud
I'm trying to write a mini stats script.
So the first thing to do is to collect the posters names:
#! /usr/bin/perl -w
use my $HOME = $ENV{HOME} || '/';
my $scan = new Group => 'nieuws.test',
Spool => "$HOME/nieuws",
From => 'nntp',
NNTPServer => 'news.nl-netwerken.com';
if (not defined $scan) {
die "Failed to create object\n";
}
elsif ($scan->error) {
die "Error: " . $scan->error . "\n";
}
##$scan->collect;
$scan->posters;
if ($scan->error) {
die "Error: " . $scan->error . "\n";
}
my $posters = $scan->posters;
print "$posters\n";
exit;
But when i run the script, it only returns this:
[ruud@localhost ruud]$ ./scan
HASH(0xa145268)
As you can see, no names.
What am i doing wrong here ?
So the first thing to do is to collect the posters names:
#! /usr/bin/perl -w
use my $HOME = $ENV{HOME} || '/';
my $scan = new Group => 'nieuws.test',
Spool => "$HOME/nieuws",
From => 'nntp',
NNTPServer => 'news.nl-netwerken.com';
if (not defined $scan) {
die "Failed to create object\n";
}
elsif ($scan->error) {
die "Error: " . $scan->error . "\n";
}
##$scan->collect;
$scan->posters;
if ($scan->error) {
die "Error: " . $scan->error . "\n";
}
my $posters = $scan->posters;
print "$posters\n";
exit;
But when i run the script, it only returns this:
[ruud@localhost ruud]$ ./scan
HASH(0xa145268)
As you can see, no names.
What am i doing wrong here ?