From: "krusty.ar@..." Date: 2008-06-30T21:17:17+09:00 Subject: Re: What am I doing wrong! Arrays On Jun 30, 2:09 am, Tj Superfly wrote: >   title = "word word1 word2 word3 word4 word5 word6 word7 word8 word9 > word10 word11 word12 word13" > >   array = title.split > >   if(array.length == "12") >     puts array[0] >   elsif(array.length == "13") >     puts array[1].to_s + " " + array[2].to_s >   elsif(array.length == "14") >     puts array[1].to_s + " " + array[2].to_s + " " + array[3].to_s >   end > > My output should be "word1 word2" but I'm getting nothing. > > What am I overlooking? I've tried everything I know, can anyone help? The previous mails have nailed the problem, but your array length is 14, so the output should be "wiord1 word2 word3" Lucas.