I am trying to print out a hash of a hash of a hash table(with code
chunk 1), but I keep getting the following error:

Use of uninitialized value in hash element at ./clearwhite.pl line 522.


I don't understand where this error is coming from since I can process
a hash of a hash just fine, using code chunk2, and i know that the
values I am trying to process exist, as i can print them out, or run
the exists/defined/true tests on them as i do here.

Where is my mistake?  How is this done?

thanks fo rlooking at this,
ryan

-------------------------

1 - Use of uninitialized value in hash element at ./clearwhite.pl line 522.
##############

   print "Exists\n"   if exists $top{$getgroup}{IOTESTS}{0} ;
   print "Defined\n"  if defined $top{$getgroup}{IOTESTS}{0};
   print "True\n"      if $top{$getgroup}{IOTESTS}{0};

#prints Exists\nDefined\nTrue\n


foreach $key (keys %top){

    foreach $key1 (keys %{$top{$key}}){

         foreach $key2 (keys %{$top{$key{$key1}}}){   # line 522

             print "$key $key1 $key2 $top{$key}{$key1}{$key2}\n";
         }
    }
}

##############

2 - works
#########
my $key; my $key1; my $key2; my $value;

foreach $key (keys %top){

    foreach $key1 (keys %{$top{$key}}){

         print "$key $key1 $top{$key}{$key1}\n";

    }
}
########

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to