From: Wayne Brisette Date: 2012-11-28T23:44:04+09:00 Subject: Re: sorting data from a file read this: http://alvinalexander.com/blog/post/ruby/how-sort-ruby-array-objects-multiple-class-fields-attributes I tried to do something very similar, and after reading Alvin's blog understood exactly how to do it. Wayne ----- Original Message ---- From: Ismail M. To: ruby-talk ML Sent: Wed, November 28, 2012 8:20:20 AM Subject: sorting data from a file Hey guys, I have a txt file that contain the following data: 34,1,2,3,3,1,6,5 55,3,3,1,1,2,5,6 66,2,4,4,4,3,3,3 67,4,5,5,5,6,2,2 68,5,1,2,2,4,4,4 69,6,6,6,6,5,1,1 where the numbers in position [0] are integers. so basically, i wan to sort the numbers from position [1..7] then pick the first four numbers after sorting in each line. any guidelines for how to do it. P.S I'm still a beginner in programming..just doing my exam project. Thank you for your help. -- Posted via http://www.ruby-forum.com/.