<?xml version="1.0" encoding="windows-1252"?>
<node id="421401" title="Re: How to iterate through a hash of hashes?" created="2005-01-11 15:08:26" updated="2005-06-04 17:20:40">
<type id="11">
note</type>
<author id="10795">
elwarren</author>
<data>
<field name="doctext">
Just to be different, save a step and use each:
&lt;code&gt;
#!/usr/bin/perl
use warnings;
use strict;

my %hash = ();

$hash{"192.168.0.1"}{"randy"} = "thomas";
$hash{"192.168.0.1"}{"ken"} = "samual";
$hash{"192.168.0.2"}{"jessie"} = "jessica";
$hash{"192.168.0.2"}{"terry"} = "ryan";

foreach my $ip (keys %hash) {
	while (my ($key, $value) = each %{ $hash{$ip} } ) {
		print "$key = $value \n";
	}
}

&lt;/code&gt;</field>
<field name="root_node">
421382</field>
<field name="parent_node">
421382</field>
</data>
</node>
