<?xml version="1.0" encoding="windows-1252"?>
<node id="125919" title="Re: Accessing a Hash of Hashes" created="2001-11-16 20:18:21" updated="2005-08-15 00:41:41">
<type id="11">
note</type>
<author id="11332">
c-era</author>
<data>
<field name="doctext">
Your problem is how you copy the data from $VAR1 to %Status. This code works for me:
&lt;code&gt;
$VAR1 = {
          '1' =&gt; {
                   '1' =&gt; {
                            'EMail' =&gt; 'norbert@thnwb.com',
                            'Name' =&gt; 'Norbert Bodkin'
                          },
                   '5' =&gt; {
                            'EMail' =&gt; 'sue@thnwb.com',
                            'Name' =&gt; 'Sue Soup'
                          }
                 },
          '2' =&gt; {
                   '3' =&gt; {
                            'EMail' =&gt; 'max@thnwb.com',
                            'Name' =&gt; 'Max Grappler'
                          }
                 }
        };

my %Status = %$VAR1;

    my $status;
    for $status (keys %Status) {
        for (keys %{ $Status{$status} }) {
            print $Status{$status}{$_}{'Name'}, br;
        }
    }
&lt;/code&gt;

The error message tells you, that instead of a hashref you have a value. If you post the code that copies $VAR1 to %Status, I would be able to help you further.&lt;p&gt;
Also, hashes don't have order. So, if you want to do a sort on keys, you'll need to create a sorted array with those keys.</field>
<field name="root_node">
125917</field>
<field name="parent_node">
125917</field>
</data>
</node>
