in reply to Re: Tracking down an uninitialized value warning
in thread Tracking down an uninitialized value warning

I'm suspicious of the "# Some more processing here which is not relevant" section..

Ok, well for the record - here are the lines that I removed:

my $icon = "$themepath/$status.gif"; my $testdetails = "/bb/html/$host.$test.html"; print qq(\t<th><a href="$testdetails">), qq(<img src="$icon" border="0" alt="$status" $iconsize title="$test +: $status since $duration ago">), qq(</a></th>\n);
Basically, I was getting a warning anytime I tried to use $status, obviously because it was undefined.

Anyway, since posting earlier I've been out for lunch and cleared my head a bit and just taken another look at it. And I've found that if I change the conditional in the if statement to:

if (defined $tref->{$host}{$test}{status}) {
...the warnings disappear.

Although this has solved my immediate problem, I'm still puzzled as to why..

defined $tref->{$host}{$test}
..returns true in this case, yet
defined $tref->{$host}{$test}{status}
..returns false - when I know for a fact (from the dumper output) that $tref->{$host}{$test} does not exist.

Thanks for your feedback :)