----Original Message-----
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Subject: RE: "Use of uninitialized value" error message

Hi Nikola/Jason 
Thanks for the help. 
The variable $result_value1 is declared within the subroutine and is never
used outside the subroutine. 
I originally had the following piece of code (which I forgot to show you
guys in the previous email): 
 
 $result_value1 = $database1{$input_key1}  
 
 But I changed the above code to the following and it worked ("Use of
uninitialized value" error message" did not appear):
 
 $result_value1 = $database1{$input_key1} || " ";  
 
------------------------------------
ahh... that would do it, though I don't think that's the preferred way to
solve your problem.
 
You are getting the "Use of uninitialized value" warning message because
$database1{$input_key1} is undef.  You are simply bypassing that by making
$result_value1 a " " if it would otherwise return undef.  By using your
original code ( $result_value1 = $database1{$input_key1}; ) with "if
($result_value1);" you do what you want and avoid the warning because you
are now checking to see if $result_value1 is defined.  I know that Nikola
says you will still get the warning, but it always works for me...  :)
 
Hope this helps...
Jason


CONFIDENTIALITY NOTICE:

************************************************************************

The information contained in this ELECTRONIC MAIL transmission
is confidential.  It may also be privileged work product or proprietary
information. This information is intended for the exclusive use of the
addressee(s).  If you are not the intended recipient, you are hereby
notified that any use, disclosure, dissemination, distribution [other
than to the addressee(s)], copying or taking of any action because
of this information is strictly prohibited.

************************************************************************

Reply via email to