hi all,
sorry for posting the same question,i have to this because my last post was really a mess.
now i will try explain my problem in concise

i have variable

my %HeaderHash=();

and i have passed values to the HeaderHash successfully
but while i try to print the HeaderHash data like

print("$HeaderHash{'Deal Name'}\n");

i am getting error like uninitialized value use
but actually i am damn sure that my HeaderHash contains "Deal Name" element with value as "102"
how to get rid fom the prob
thanks in adv

9 Years
Discussion Span
Last Post by masijade

I tested the couple lines you posted and as I suspected they work fine. Your problem is with a different line. You will need to post additional information. Include version of perl just in case that makes any difference.


Post code and sample data. On a side note do not use parenthesis in your print statements:

print("$HeaderHash{'Deal Name'}\n");

better written as:
print "$HeaderHash{'Deal Name'}\n";

while this is not the source of your problem, using parenthesis with the print command is in general a bad habit to get into. Se the print documentation for some details:



I will go out on a limb, and assume that you passed this hash to a method, and call the print statement in that method. In this case the print statement needs to be changed to:

print "$HeaderHash->{'Deal Name'}\n";

If that is not the case, then as KevinADC has said (and cerf_machine repeated without acknowledgement), your problem is elsewhere.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.