in reply to Hash of hashes question

First of all:
use strict; use warnings;
This will save you a lot of time debugging.
This is how I would go about traversing your hash:
for my $key(keys %termservers) { for my $key2(keys %{$termservers{$key}}) { print "$key1 - $key2 = $termservers{$key1}{$key2}\n"; } }
Update:
If you don't already have it, and I'm guessing you don't, get the "Camel" book (Programming Perl). Chapter 9 discusses data structures in depth. This book is a must read for any perl programmer.

Replies are listed 'Best First'.
Re: Re: Hash of hashes question
by Enlil (Parson) on Oct 22, 2003 at 16:09 UTC
    Update:
    If you don't already have it, and I'm guessing you don't, get the "Camel" book (Programming Perl). Chapter 9 discusses data structures in depth. This book is a must read for any perl programmer.

    Though I would recommend the book, "perldoc perldsc" does a pretty good job as well, and then you don't have to wait to you can get a book (or get to a Camel book) to get the skinny on data structures.

    -enlil
      There's even a specific book on modules, references and objects, which I suspect is an edited and expanded version of the core documentation regarding those subjects. According to some reviews I've seen, it's pretty good.

      Arjen