From: MonkeeSage Date: 2007-11-25T21:15:02+09:00 Subject: Re: extract consecutive lines of data def input_matrix(file) File.open(file) { |f| f.readlines.collect { |line| line = line.chomp if line.empty? then nil else line.split end }.compact.transpose } end p input_matrix(ARGV[0]) ^ Composes matrix from first file given on command line, ignoring blank lines in file. Regards, Jordan