From: John Labovitz Date: 2006-09-24T15:05:31+09:00 Subject: Re: Help w/ Codegolf Total Triangles- reading input On Sep 23, 2006, at 10:44pm, Drew Olson wrote: > a = readlines.each{|i|i.split(" ").each{|j|j=j.to_i}} You don't want #each, but rather #map or #collect: a = readlines.map { |i| i.split(" ").map { |j| j.to_i } } And just as a point of style, some whitespace in there would read a whole lot better. --John