My previous message got kinda long, so here's some tested Perl that does just what Eric's last message asked for:
#!/usr/bin/perl -w use strict; my %facets = ( 'tools' => { 'dictionaries' => { 'websters' => 'http://websters.com', 'oxford' => 'http://oxford.edu' }, 'catalogs' => { 'und' => 'http://catalog.nd.edu', 'worldcat' => 'http://worldcat.com' }, }, # other elements of %facets ); # iterate foreach my $facet_key (keys %facets) { print "$facet_key\n"; my %sub_hash = %{ $facets{$facet_key} }; foreach my $sub_key (keys %sub_hash) { print "\t$sub_key\n"; my %inner_hash = %{ $sub_hash{$sub_key} }; foreach my $inner_key (keys %inner_hash) { print "\t\t$inner_key - $inner_hash{$inner_key}\n"; } } } __END__ # prints: tools dictionaries oxford - http://oxford.edu websters - http://websters.com catalogs worldcat - http://worldcat.com und - http://catalog.nd.edu - Bruce __bruce__van_allen__santa_cruz__ca__