From: "Jesús Gabriel y Galán" Date: 2010-11-15T20:49:31+09:00 Subject: Re: please help load from txt On Mon, Nov 15, 2010 at 10:19 AM, Lark Work wrote: > hi thanks for your reply i going to try it what i want is that is just > prints it in > >    puts "Name: #{@data[0]} #{@data[1]}" >    puts "Callname: #{@data[2]}" >    puts "Age: #{@data[3]}" > > data0 = name > data1 = lastname > data2 = callname > and data3 = age > > and thats what i want to call from the txt file If you just want to print it, I wouldn't bother with classes or anything more complex: File.foreach("data.txt") do |line| name,last_name,call_name, age = line.chomp.split(",") puts "Name: #{name} #{last_name}" puts "Callname: #{call_name}" puts "Age #{age}" end This should suffice. Jesus.