develooper Front page | perl.beginners | Postings from February 2002

Multidimensional hashes..

Thread Next
From:
Lorne Easton
Date:
February 5, 2002 17:33
Subject:
Multidimensional hashes..
Message ID:
20020206013313.35123.qmail@onion.perl.org
Hopefully an easy one for you guys.

Let's say that you want to have a hash that has a descriptive name (say of a
PC)
and some other inportant imformation.  This information I want to be
associated
with the PC in that it is a second dimension to the hash value "Name" being
it's name..

Is there an easy way of iterating through the hash based on the
computername..
I.E: I want to have the first computername returned, the get the values for
it
and so on, the same way you could do with foreach and an array..

Could you please provide a simple example that you could use to do this??

I hope that this makes sense.. Cheers..

Lorne





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About