Re: non-determinate program execution in perl

From: srg krn (srgqwerty_at_gmail.com)
Date: 08/31/05

  • Next message: Rodney D. Myers: "[hardware] PCI IDE controller oddity"
    Date: Wed, 31 Aug 2005 22:51:31 +0200
    To: debian-user@lists.debian.org
    
    

    I have no idea of perl at all.
    It is possible that line 40 must be:
    $server->user(%pop{user}) || die;
    instead of:
    $server->user($pop{user}) || die;
    ?

    On 8/30/05, Donald Perkovich <donp@mindspring.com> wrote:
    >
    > I have a perl program that runs every hour that scans a POP3 maildrop.
    > About once every other day the program fails and I get this error:
    >
    > Can't call method "user" on an undefined value at
    > /home/user/bin/fetch-headers.pl line 40.
    >
    > It appears to me that the hash isn't being properly initialized.
    > Here is the code that initializes the hash. None of these values
    > are changed in the program once they are set.
    >
    > my %pop = (
    > server => 'pop.example.org <http://pop.example.org>',
    > port => 110,
    > user => 'someuser@example.org',
    > pass => 'asswordpay',
    > dir => '/home/user/mail'
    > );
    >
    > Here is Line 40.
    >
    > $server->user($pop{user}) || die;
    >
    > My questions are:
    > (1) Is there a better way to initialize the hash?
    > (2) Could this be a fault in perl itself?
    > (3) Is it something else entirely?
    >
    > Don
    >
    >
    > --
    > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
    > with a subject of "unsubscribe". Trouble? Contact
    > listmaster@lists.debian.org
    >
    >

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Rodney D. Myers: "[hardware] PCI IDE controller oddity"