in reply to manipulating a hash of arrays

What I want to do is take each key and compare it with all the keys in my HoA...

...which is probably pointless since hash keys are guaranteed to be unique.

...as well as with every element in the array for each key...

Ok, that's not too difficult.

(and if any element in any of the arrays is the same as the key i am currently comparing with I don't want to compare that either).

Huh? I was almost following you until you got to that last part.

Slow down, think it through, and post an example along with a coherent question. ...and before you hit "submit" be sure that you read it through just once more to make sure that the question actually says what you think it does.


Dave


"If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: Re: manipulating a hash of arrays
by jepri (Parson) on Oct 16, 2003 at 04:16 UTC
    ...which is probably pointless since hash keys are guaranteed to be unique.

    Which doesn't stop him comparing them. He might be interested to see if one is a substring of the other, or maybe all the keys are numbers, and he wants to compare them to see which ones are bigger or smaller...

    Huh? I was almost following you until you got to that last part.

    I'm guessing a bit here, but I think he doesn't want to compare the keys if one key already "contains" the other key. Still fairly easy to do though.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

      I don't know what his intentions are, and would rather not jump to conclusions; it's an exercise that leads to wasted effort.

      I'd rather just see the question re-asked in a way that doesn't require that I guess at its meaning, only to find out later that the time taken in considering and answering the question was wasted on an errant assumption.


      Dave


      "If I had my life to do over again, I'd be a plumber." -- Albert Einstein