On Wed, Sep 19, 2012 at 1:29 PM, Robert Klemme
<[email protected]> wrote:
PS: Here's probably a even more rubyesce solution - albeit not faster
$ cat ruby-8.rb
#!/usr/bin/env ruby
f = 'FRED'
puts File.foreach("results201101.dat").count {|line| line.include? f}
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
-- You received this message because you are subscribed to the Google Groups
ruby-talk-google group. To post to this group, send email to
[email protected]. To unsubscribe from this group, send email
to [email protected]. For more options, visit this
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en