in reply to uninitialized value in hash element Error

I think it's quite simple -- you're doing this:
if ($fields{"TechEmail"} ne "")
To see if there's anything defined for $fields{"TechEmail"}, which, as you're checking it, must sometimes be false.

If you use "defined" it should go away:

if ( defined ($fields{"TechEmail"}) )


“Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
M-J D

Replies are listed 'Best First'.
Re: Re: uninitialized value in hash element Error
by Dru (Hermit) on Jul 04, 2003 at 12:56 UTC
    Thanks all. Cody Pendant, I was still getting the error when using defined, but that looks cleaner, so I'm going to use it. Paladin, yup, you are correct, it works the way you have it. Thanks a million. I love this place. I need to go and donate some more money ;-)