From: Logan Capaldo Date: 2006-09-13T08:33:16+09:00 Subject: Re: getting the last word in each line On Wed, Sep 13, 2006 at 07:18:44AM +0900, Vincent Fourmond wrote: > What about > > File.read(some_file).to_a.map { |l| line.split.select {|v| v =~ > /regex/}.last } That call to_a is unecessary. File.read(some_file).map { ... } will work just as well. > > Vince >