Hi Robert and Marcus,

thanks for your help. Both methods are working very fine :D.
But now I have the Problem that I couldn't combine the values.

The Result of my script looks like:

=> {"I OFF"=>["34"], "E OFF"=>["92", "94"], "E ON"=>["7f"],
    "I ON"=>["d9", "cf"]}

I get always a nil when I want combine each value from one Array with 
the other values from the other Arrays. I use

 data.first.product(*data[1..-1]).map(&:join)

Can u say what the problem is now?

And if its possible can you explain how I can only combine I with E 
values.
It doesnt make sense if I combine "I ON" with "I OFF" or "E ON" with "E 
OFF".

Thank u so much. I have been working for a few days but i dont find 
anything.

-- 
Posted via http://www.ruby-forum.com/.