in reply to Re: How to check number of messages using Net::POP3?
in thread How to check number of messages using Net::POP3?

This is unfortunately not the solution. Still get this error message when login fails. The message disappears if I do not use diagnostics;
  • Comment on Re: Re: How to check number of messages using Net::POP3?

Replies are listed 'Best First'.
Re: How to check number of messages using Net::POP3?
by b10m (Vicar) on Dec 23, 2003 at 22:55 UTC

    Ok, I have tested it on 3 machines now:

    1. Linux Debian
      • Perl v5.8.0
      • Net::POP3 v2.24

    2. Linux Slackware
      • Perl v5.6.0
      • Net::POP3 v2.23

    3. FreeBSD
      • Perl v5.8.0
      • Net::POP3 v2.24
    And got the following results:

    Machine Result
    1 Initially gave the same error message, but that got solved after moving $pop->quit() outside the if-statement.
    2 Initially gave the same error message, but that got solved after moving $pop->quit() outside the if-statement.
    3 Initially gave the same error message, but that got solved after moving $pop->quit() outside the if-statement.

    I tested your posted code verbatim first, and with my slight alteration afterwards. I did not take out the "use diagnostics;". So I am now curious what Perl and Net:POP3 versions you use. Oh, maybe it has anything to do with it, but I tested the script on a qpopper POP3 daemon, first with one line in "./addresses" and later with multiple lines.

    Update: now also tested with the "POP3 Server (Version 1.006d)" daemon, same result.

    --
    b10m
      My configuration:

      Linux Debian
      Perl v5.8.2
      Net::POP3 v2.24

      I still think that the problem is that the server disconnects after the failed login and I need a way to find out whether the connection is still alive before I quit.