From: Francisco Martinez Date: 2010-08-11T23:35:25+09:00 Subject: how to print an array Hi, I have done this method in order to put the content of a txt file into an array. Now I should have to construct a bucle out of the method to print the content of the array in the screen but I dont't know what to do. This is my method: def cargar_tokens(txtFileName) tokens=[] txtFile = File.open(txtFileName) txtFile.each(" ") do |palabra| if (palabra=~ /(.+)/) token = $1 tokens.push(token) end end txtFile.close return tokens end if (ARGV.length<1) puts "I need one argument: 1) name of the file" else tokens=cargar_tokens(ARGV[0]) end -- Posted via http://www.ruby-forum.com/.