in reply to Re: Array question
in thread Array question

Thanks I will give that a try. You see the issue i was running into is that I have two array's with a list of just the file names. But they could be in a different order, or one array could have more then the other, so I had to find away that we take the first file name, compare against all the names in the 2nd array, then go back to the 2nd file in the 1st array, and compare against all the file names in the 2nd array. Does that make sense?

Replies are listed 'Best First'.
Re^3: Array question
by Corion (Patriarch) on Nov 20, 2009 at 16:14 UTC

    I would try to get away from needing to rely on things like "order". Which is why I suggest you use a hash, and building a unique key to find the matches between the two lists.

    Again, finding the criteria that make a match between the two lists is something only you can know. But if you have found and formulated what makes two elements "identical" in your case, it makes finding the match much easier, because then you can use that "identity" as the key into a hash and check whether an element with that key exists or not.