From: Lee Jarvis Date: 2008-01-23T21:13:41+09:00 Subject: Re: How to improve this code? Jair Rillo Junior wrote: > Hey guys, so many ways to do !!! > > I didn't know about csv library, as well as I didn't know about the << > operator. Yeah its actually a method.. Array#<< it seems to be prefered over Array#push, although they both return the array itself so you can string along a load of appending values together.. >> foo = [1,2] => [1, 2] >> foo << 3 << 4 => [1, 2, 3, 4] >> foo.push(5,6) => [1, 2, 3, 4, 5, 6] >> foo.push(7).push(8) => [1, 2, 3, 4, 5, 6, 7, 8] Regards, Lee -- Posted via http://www.ruby-forum.com/.