From: dblack@... Date: 2006-08-27T19:50:03+09:00 Subject: Re: No speedup...! Hi -- On Sun, 27 Aug 2006, William James wrote: >>>> >>>> puts ARGV.map{|f|IO.readlines(f).find{|s|s=~/^begin/}} >>> >>> >>> Or maybe: >>> >>> puts ARGF.find {|s| /^begin/.match(s) } > > No, this only finds one instance. Mine finds the first > in each file. Whoops; so it does. David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy ----> SEE SPECIAL DEAL FOR RUBY/RAILS USERS GROUPS! <----- http://dablog.rubypal.com => D[avid ]A[. ]B[lack's][ Web]log http://www.manning.com/black => book, Ruby for Rails http://www.rubycentral.org => Ruby Central, Inc.