Net::NNTP Undefined value

Discussion in 'Perl Misc' started by Gene Mat, Jul 8, 2003.

  1. Gene Mat

    Gene Mat Guest

    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
    Gene Mat, Jul 8, 2003
    #1
    1. Advertising

  2. Gene Mat

    Tony Curtis Guest

    >> On Mon, 07 Jul 2003 23:45:58 GMT,
    >> (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
    Tony Curtis, Jul 8, 2003
    #2
    1. Advertising

  3. Gene Mat <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 8, 2003
    #3
  4. Gene Mat

    Gene Mat Guest

    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

    (Tad McClellan) wrote in
    <>:

    >Gene Mat <> 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.
    >
    >
    Gene Mat, Jul 8, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gene Mat

    NET::NNTP Undefined value error

    Gene Mat, Jul 8, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,700
    Gene Mat
    Jul 8, 2003
  2. Gene Mat

    Re: Net::NNTP Undefined value

    Gene Mat, Jul 8, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,002
    Gene Mat
    Jul 8, 2003
  3. Anton Bangratz
    Replies:
    0
    Views:
    160
    Anton Bangratz
    Jun 4, 2008
  4. Replies:
    7
    Views:
    383
    Dr.Ruud
    Aug 9, 2006
  5. sadie-no-reply

    Posting to nntp newsgroup with Perl (Net::NNTP)

    sadie-no-reply, Mar 4, 2007, in forum: Perl Misc
    Replies:
    3
    Views:
    286
    Jamie
    Mar 5, 2007
Loading...

Share This Page