From: Al Cholic Date: 2007-07-27T10:59:53+09:00 Subject: Re: How to delete array element and add to previous element I reposting my last response since there is no edit on this forum. Sorry about the syntax. I was just trying to show the array, it was not intended to be ruby code. What Im trying to do is read a text file and then make sense of the data in that text file and store that info in a database. I have managed to sort out into the arrays but need to get the POS2c etc elements into the same array (im guessing thats the best way to do it). For example here is code that im shuffling: 49 7 RP13,RP15,RP17,RP19,RP24, 12X2 33XD Wireless, Independent, 5% RP32,RP33 50 4 RP27,RP28,RP30,RP31 10XC4 3X567 Network, Isolated, 5% 51 31 R1,R2,R8,R30,R32,R33,R35, 0603,R10K,1% 0603 3%,1/12W R37,R39,R41,R42,R43,R49, R50,R51,R52,R58,R68,R69, R71,R72,R74,R85,R95,R117, R129,R130,R155,R156,R158, R160 What I've done is split the text up into lines stored all the lines in an array with text.strip.split("\n") But as you can see the R71, R129, the elements in the third column continue on the next line. I need a way to get them into one place. Because those elements that are on the next line are a continuation of the third column element. The elements on the line are separated by tabs. -- Posted via http://www.ruby-forum.com/.