Apr 8, 2008, 10:58 AM
Post #3 of 4
Not a problem, sorry for being unclear, I'm a bit scatter brained.
Re: [KevinR] Comparing Arrays, Elements out of Sync
[In reply to]
Essentially I am creating two arrays, a FORWARDdns and REVERSEdns array. Each array consists of the last octet of every IP in the zone file. I am comparing them against each other to check for missing entries. Essentially the for statement just steps down both arrays checking to see if the values in each element are equal or not equal. The trouble happens when it runs into an exception because then the elements are out of sync between both arrays, for example in the simplest terms...
@FORWARDDNS = (1,2,3,4,5,6,7,8,9);
@REVERSEDNS = (1,2,3,4,6,7,9);
All is well until we find the exception for 5, after that even though there are matching entries they appear as failures because the two arrays are out of sync. It will go on to compare 6 to 7, 7 to 9, 8 to nothing, and 9 to nothing.
Hope that brings a bit more clarity to my situation.