in reply to Re: Array searching
in thread Array searching

Umm, no. OP wrote "... and replace it with a number from the second array with out duplicating numbers in the first array".

It's not clear if OP intended to add a new element to the first array or replace the deleted element's value. That is, it's not clear if the ordering of the array is important of not, but it is clear that the first array should get a new element from the second array that doesn't already exist in the first array.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^3: Array searching
by thezip (Vicar) on Apr 13, 2007 at 00:41 UTC

    I spoke with OP in CB and he stated that order was *not* important, and that duplication was not allowed.

    Based upon this additional info, I solved the task using hashes.


    Where do you want *them* to go today?
      Thanks so much!