Net::NNTP Undefined value

G

Gene Mat

Hi, I'm trying to build a simple program to list all the newsgroups in the
server. However, I can't get this program to run, here's what I have.

#!/opt/local/bin/perl
use Net::NNTP;
$nntp = Net::NNTP->new("nntp.perl.org",Debug,10);
my $LIST=nntp->list;
$nntp->quit;

Can't call method "list" on an undefined value at ./getnntp.pl line 13.

Other methods of the Net::NNTP work fine, including
article,group,xover,date,etc. Just the list, active and newsgroups methods
die with undefined value error.

Please Help.
Gene Mat
 
T

Tad McClellan

Gene Mat said:
my $LIST=nntp->list; ^^^^^

Please Help.


Please ask a machine to help you *before* asking thousands of
people around the world to help you.

You should always enable warnings when developing Perl code.
 
G

Gene Mat

Your right Tad. I've now become an instant fan of

use warnings;
use strict;

I'm new perl and Usenet, but I'll me more carefull when posting in the
future.

Thanks for everyones help,
Gene Mat

(e-mail address removed) (Tad McClellan) wrote in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top