Johnathan Wagner wrote:
> Thanks for your fast answer.
> 
> One last question, if you can help me.
> 
> How can I compare each characters in a string?

You can compare each character individually by using the each_byte 
method, however that gives you the ASCII representation of the 
character. In your case I would split each line by spaces to get each 
number as a substring like so:

File.open("myfile.txt").each do |line|
  line.split(" ").each do |num|
    # do your work here
  end
end


-- 
Posted via http://www.ruby-forum.com/.