in reply to Weird Net::POP3 problem

Debugging with print can often be quite revealing. What does   print 'pop3_host="', $CFG{'pop3_host'}, '"', "\n"; show?

Replies are listed 'Best First'.
Re: Re: Weird Net::POP3 problem
by j0e (Acolyte) on Apr 13, 2001 at 05:57 UTC
    I get the following output:
    pop3_host="ryoko"
    That seems to be correct; ryoko is the hostname of the pop3 server, and I get the same output if I define the variable statically. Very weird.
      If both "versions" of "ryoko" consistently yield different results, despite appearing identically, your assumption that they are the same value is invalid. The likely possibility is that there are unprintable characters in the string. If the file was generated under MS-DOS, for instance, you might be seeing a trailing ^Z or something. Newline conventions might also be screwing you up, but if you saw a quotation mark followed by ryoko followed by another quotation mark, that's probably not it.

      I would try splitting the string up and examining each byte, printing its value. That way you can be sure the strings are truly identical. (That, or use 'eq' I guess.)

        I tried examining the string with the following line of code, which should split the string into an array of ASCII values:
        my @blah = map { ord } split(//, $pop3_host);
        Unfourtunatley, I recieved identical results for both 'versions' of ryoko, and neither of them seemed to have unpritable chars or newline chars. Is there a different way I should be examining the string?
      And does one of the two ryoko's yield a hang?

        No, as far as I can tell its not even connecting to ryoko. Here is the debug information that Net::POP3 spits out:
        Net::POP3: Net::POP3(2.21) Net::POP3: Net::Cmd(2.18) Net::POP3: Exporter Net::POP3: IO::Socket::INET Net::POP3: IO::Socket(1.1603) Net::POP3: IO::Handle(1.1505)
        Thats as far as it gets before it hangs and times out. If I define the variable statically, here is what I get:
        Net::POP3: Net::POP3(2.21) Net::POP3: Net::Cmd(2.18) Net::POP3: Exporter Net::POP3: IO::Socket::INET Net::POP3: IO::Socket(1.1603) Net::POP3: IO::Handle(1.1505) Net::POP3=GLOB(0x830aac4)<<< +OK QPOP (version 3.1.2) at ryoko.leet.or +g starting.
        ...and so on and so forth. I'm beginning to think this is some kind of bug in Net::POP3...