From: 7stud -- Date: 2012-11-29T04:15:36+09:00 Subject: Re: sorting data from a file Alan Forrester wrote in post #1086915: > > In your script, read the file into an array using > myarray = IO.readlines("myfile.txt") > Why would you suggest that? What's the matter with the method: IO.foreach(fname) {|line| #code here} -- Posted via http://www.ruby-forum.com/.