OK. That's an approach. I'll check this out!

Thank you all for your help

Peter

> Hi all,
> 
> Once again I disturb you for a, maybe, obvious thing
> I can't figure out.
> 
> I have successfully created an md array (see older posts
> from me) thanks to the support found here.
> 
> Now I would like to list all String items in the source array
> (a Text file containing numbers) and convert and place them into the 
> destination array as int objs. I know about the String#split method but 
> this recreates an array that does not match the dimensions I want
> (e.g. lines with different length).
> 
> My approach is very c-ish:
> 
> <code>
> # @source is a String array. If the string contains a non-convertible
> # substring, 0 is placed in destination array. @array is the destination 
> # md array created with the appropriate dimensions according to @source 
> # (longest line as vindex (-) and index as hindex (|) )
> 
> for i in 0... / hindex.length
>     for j in 0...@vindex[i].length
>         @array[i][j] = @source[i][j].to_i.char.to_i
>     end
> end
> </code>
> 
> Is there a Ruby way to replace <code> with blocks?
> 
> Thank you very much for a hint.
> 
> Brgds,
> Peter