On 11 Oct 2005, at 13:38, Kroeger, Simon (ext) wrote:

> a = [[1.4, 2.2, 2.1, 4.2], [2.1, 3.1, 2.4, 2.2], [3.1, 1.3, 2.5, 2.1]]
> puts '{{' + a.map{|b| b.join(', ')}.join('}, {') + '}}'
>
> =>{{1.4, 2.2, 2.1, 4.2}, {2.1, 3.1, 2.4, 2.2}, {3.1, 1.3, 2.5, 2.1}}

Cool - didn't realise Ruby had mapcar stuff. Haven't got that far in  
the tutorials yet! :-)

thanks

Pete