Bob wrote:


>>lines = File.readlines(ARGV[0])
>># create a file to append data found from the input file
>>logfile = File.open("badwords.txt", "w+")
>># search for a word and print the entire line
>>lines.each { | line  |
>>   if /bob/i =~ line  
>>     print line
>>     logfile.write(line)
>>   end
>>}
> Very good! It does indeed do it! Now...since these are very large
> files (40-60MB)...is this the best way to read them in?


... does the file get closed?

Tobi


-- 

* peace&love.
* http://www.pinkjuice.com/