On 28 Nov 2012, at 19:15, 7stud -- <[email protected]> wrote: > 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}
I think the problem for somebody who knows very little Ruby will be filling in the "code here" part of that prescription without ever looking the object to which he is applying the code. Alan -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
