non-determinate program execution in perl
From: Donald Perkovich (donp_at_mindspring.com)
Date: 08/30/05
- Previous message: brodul: "Install problem: Kernel panic: No init found. Try passing init= option to kernel."
- Next in thread: srg krn: "Re: non-determinate program execution in perl"
- Reply: srg krn: "Re: non-determinate program execution in perl"
- Reply: Nelson Castillo: "Re: non-determinate program execution in perl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Aug 2005 11:30:20 -0700 To: debian-user@lists.debian.org
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',
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
- Previous message: brodul: "Install problem: Kernel panic: No init found. Try passing init= option to kernel."
- Next in thread: srg krn: "Re: non-determinate program execution in perl"
- Reply: srg krn: "Re: non-determinate program execution in perl"
- Reply: Nelson Castillo: "Re: non-determinate program execution in perl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- RE: question on Perl determinism with hash keys
... Any idea on the relative performance of a hash tied to IxHash vs. a ... vanilla
hash? ... question on Perl determinism with hash keys ... If I populate a %hash
within a Perl program, ... (perl.beginners) - Re: Can you tell me how to change from regular Perl to Mod_perl
... Hash: SHA1 ... > then all my old perl program can work with mod_perl?
... =rSyG ... (comp.lang.perl.misc) - Re: Store Object Class in DBM Hash
... simplicities sake I created a small perl program to demonstrate what I ... sub
docno ... If I run this program with the DBM hash it returns "Can't locate ...
(comp.lang.perl.misc) - question on Perl determinism with hash keys
... If I populate a %hash within a Perl program, is there any guarantee that
... from run to run of the same Perl program the keysfunction will ... (perl.beginners)