Just keep doing it ;->
                   $tp3Lookup{$fileTypeKey}{$tpKey})

is your reference to the inner anon hash.  Syntatic sugar pointers make it 
(to me) a little clearer
                   $tp3Lookup{$fileTypeKey}->{$tpKey})

but
foreach my $anonKey ( keys %{  $tp3Lookup{$fileTypeKey}->{$tpKey} } )  {

A clarity trick (see "The Randal" article:
http://www.samag.com/documents/s=10108/sam0701h/

or, more complex Cozens on:
http://www.perl.com/pub/a/2006/11/02/all-about-hashes.html 

) is to take a scalar 'ref' to the anon hash along the way:
       my $anon_ref = \%{ $tp3Lookup{$fileTypeKey}->{$tpKey} };

and use that in the now, slightly saner for loop:
               foreach my $anonKey ( keys %{ $anon_ref } ) {

i.e.
print "\nTest iterating over the 3 dimensional hash of hashes...\n";
foreach my $fileTypeKey (keys %tp3Lookup) {
         print "$fileTypeKey => \n";
         foreach my $tpKey (keys %{$tp3Lookup{$fileTypeKey}}) {
               print "\t$tpKey => $tp3Lookup{$fileTypeKey}->{$tpKey}\n";
               print "\tThis is a ",
                   ref($tp3Lookup{$fileTypeKey}->{$tpKey})," reference. 
\n";
               my $anon_ref = \%{ $tp3Lookup{$fileTypeKey}->{$tpKey} };
               foreach my $anonKey ( keys %{ $anon_ref } ) {
                  print "\t\t$anonKey => $anon_ref->{$anonKey}\n";
               }    #  foreach my $anonKey ( keys %{ $anon_ref } )
        }           #  foreach my $tpKey (keys 
%{$tp3Lookup{$fileTypeKey}}) 
}                   #  foreach my $fileTypeKey (keys %tp3Lookup) 

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738  FAX 264-5932

"Procrastination is like putting lots and lots of commas in the sentence 
of your life."
Ze Frank 
http://lifehacker.com/software/procrastination/ze-frank-on-procrastination-235859.php
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to