Ok, from what i understand you are iterating thought the entire first
array and then testing the content of it in the second, thats seems
ok. Let me check if that can solve my problem.

And, related to the article i don't know for sure, i wrote something
in the past but it was in spanish can you point me to the article or
at least the title of it.

Thanks.
On 2/27/07, Robert Dober <robert.dober / gmail.com> wrote:
> On 2/27/07, Rafael George <george.rafael / gmail.com> wrote:
> > Hi, im trying to compare two arrays and creating a new one with the
> > values that are in the second array and the values that aren't
> > concatenated with "NOT FOUND", here is the snippet code. Im getting a
> > weird result im getting the same values saying "not found" and without
> > the concatanation, can somebody please give me a hint of what is going
> > on.
> >
> > Thanks in advance.
> >
> >  def handle_data(data1,data2)
> >    c = 0
> >    t = 0
> >    result = []
> >   while c < data1.length
> >     k = 0
> >     while k < data2.length
> >       if data1[c].length > 7
> >          result[t] = data1[c].include?(data2[k]) ? data1[c] :
> > data1[c]+" NOT FOUND"
> >          t += 1
> >       end
> >       k += 1
> >     end
> >     c += 1
> >    end
> >    return result.uniq
> >  end
> >
> >
> > --
> > Grimoire Guru
> > SourceMage GNU/Linux
> >
> >
> If I understand correctly you want something like
>
> ary1.map{ |ele| ele.to_s << ( ary2.include?( ele ) ? "" : " NOT FOUND" ) }
>
> HTH
> Robert
>
> BTW did I read an article of you in the French Linux Mag recently?
>
> --
> We have not succeeded in answering all of our questions.
> In fact, in some ways, we are more confused than ever.
> But we feel we are confused on a higher level and about more important things.
> -Anonymous
>
>


-- 
Grimoire Guru
SourceMage GNU/Linux