From: Tj Superfly Date: 2008-06-30T14:09:04+09:00 Subject: What am I doing wrong! Arrays 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? Regards, TJ -- Posted via http://www.ruby-forum.com/.