Joseph L. Casale wrote:
The first hash has several entities, one of which is 'object'. Inside this hash, I have several other hashes, all of which are actually named '0' and up.

I guess I overlooked just iterating through that second hash.

I am now stuck in leveraging those hashes as the syntax is eluding me. The hashes I will use are $workspace->{Object}->{0} up to $workspace->{Object}->{n}. All the examples on the net I have found don't show referencing hashes in this manner.

Did you try the Perl documentation?

    perldoc perlref
    perldoc perlreftut
    perldoc perldsc

Since it is a hash I have (coincident they are named 0 and up) I would use a while/each, so how does one write that?

As an example

While ($workspace->{stuff}) {
        print "$workspace->{stuff}->{"Iterated element"}->{type}\n";
}

This would print the keys in the second level hash:

    while ( my ($key, $val) = each %{ $workspace->{Object} } ) {
        print "$key\n";
    }

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to