I need to step through a byte array untill I find a certain value, then
I need to check that the next item in the array is a certain value, it
is the first index that I require.

So two questions:

1. How would you do it? (my ruby sucks, so interested in seeing decent
code)

2. If your in a block
     i.e.
         myarray.each_with_index{|a,i| if(a == 666):return i end}
then how can you exit the block and return a value without continuing
through the loop.

Thanks,
Jim.

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