in reply to Re: HASH HELP PLEASE
in thread HASH HELP PLEASE

Looks like a way to go... can be more specific,I am new to hashes. Since I could'nt deal with this woth 2D arrys,turned on to hashes. How do I assign values:to hash of hash of hash and how the hell i print it? Looks like they are not in the order.... please help me.

Replies are listed 'Best First'.
Re^3: HASH HELP PLEASE
by MidLifeXis (Monsignor) on Jun 01, 2008 at 17:06 UTC

    Hashes are, by definition, unordered (or rather, not in an order you would think of :). If you need them sorted, then see the keys() and sort() functions.

    You may want to also search for HoHoH

    --MidLifeXis

Re^3: HASH HELP PLEASE
by apl (Monsignor) on Jun 01, 2008 at 18:02 UTC
    You can think of a hash as being like an array, only using a unique string as a key rather than a unique number as an index. (push adds an element at the end of an array, so you never need to know the index. With a hash, you have to explicitly specify what the key is, as in for example, "Sample 17".)

    Take a minute and read the Data Type: Hash tutorials. Again, if you have explicit questions, don't hesitate to ask.

Re^3: HASH HELP PLEASE
by McDarren (Abbot) on Jun 02, 2008 at 01:11 UTC
    Have a read of the PDSC (Perl Data Structures Cookbook).