Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Net::NNTP Undefined value (http://www.velocityreviews.com/forums/t869986-net-nntp-undefined-value.html)

Gene Mat 07-07-2003 11:45 PM

Net::NNTP Undefined value
 
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

Tony Curtis 07-07-2003 11:52 PM

Re: Net::NNTP Undefined value
 
>> On Mon, 07 Jul 2003 23:45:58 GMT,
>> geneSPAMAWAYmat@yahoo.com (Gene Mat) said:


> 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.


> my $LIST=nntp->list;

^^^

hth
t

Tad McClellan 07-08-2003 12:22 AM

Re: Net::NNTP Undefined value
 
Gene Mat <geneSPAMAWAYmat@yahoo.com> wrote:

> 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.


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Gene Mat 07-08-2003 09:07 PM

Re: Net::NNTP Undefined value
 
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

tadmc@augustmail.com (Tad McClellan) wrote in
<slrnbgk3mb.3da.tadmc@magna.augustmail.com>:

>Gene Mat <geneSPAMAWAYmat@yahoo.com> wrote:
>
>> 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.
>
>




All times are GMT. The time now is 03:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.