From: Farrel Lifson Date: 2006-04-18T21:02:25+09:00 Subject: Re: split words with two columns You could use shift and then join the rest: "#{words.join(' ')}\n" On 4/18/06, Dani wrote: > Hi everyone, I need a little support. I have this script: > > outfile = ARGV.shift > > lines = ARGF.readlines > marked_up_lines = lines.map do |line| > words = line.split > '' + words[1] + '' + "\n" > end > > File.open(outfile,'w') do |file| > file.write marked_up_lines.join > end > > This should split words in two columns to a HTML tag. But if I have more > then two words in the columns it cut down from the thrid word. > What should I add to see the other words? Or, does anyone have a better > script? > Regards, > > Daniel > >