in reply to Hash problem.

It is difficult for me to reproduce your problem because your code is not generalized in any way. I do not have Lotus Notes. However I have run into this error many times. I recently read a wonderful suggestion to safequard against this error.

First suggestion is to turn on warnings and diagnostics for testing. This shows you as much information about your error as possible.{leave the strict pragma on!}

use warnings; use diagnostics;

So here is an simple example of the error:

use strict; use warnings; use diagnostics; my $href; my %hash; %hash = %{$href}; --Error-- Can't use an undefined value as a HASH reference at line 8 (#1) (F) A value used as either a hard reference or a symbolic referenc +e must be a defined value. This helps to delurk some insidious errors. Uncaught exception from user code: Can't use an undefined value as a HASH reference at line 8.

You can not deference a reference that is not defined. But you can deference a reference to an empty object. Like this:

use strict; use warnings; use diagnostics; my $href = {}; my %hash; %hash = %{$href}; --Error-- This caused no error

And here is the wonderful suggestion I read in the Effective Perl Programming Book p.125 by Hall with merlyn. If you can't intialize your hash reference, have the expression default to an empty anonymous hash reference. Like this:

use strict; use warnings; use diagnostics; my $href; my %hash; %hash = %{$href || {}}; --Error-- This caused no error also

I apologize if this comment was too general and was not helpful in solving your problem

Man I love that book!

-DeaconBlues