From: Martin Sharon Date: 2009-04-27T09:25:57+09:00 Subject: Re: How to parse a "line"? Thank you Todd, but the number of the keywords are dynamic. and the array size is not fixed until program reads the first keywords of the input line. The line may be "3 tokyo newyork paris", also maybe "6 toyota bmw honda GM Ford" So I can't hard coded this array in the program. How can I parse the line? Thanks! Todd Benson wrote: > On Sun, Apr 26, 2009 at 5:55 PM, Todd Benson > wrote: >> >> (items = my_item_list).split.shift > > Oops... > > (items = my_item_list.split).shift > > Todd -- Posted via http://www.ruby-forum.com/.