First, let me think everyone for the wonderful advice, especially,
Jeremy. I would like to combine the following statements into one
statement. Any ideas, or do I need to keep them separate?

outfile.write(line) if line =~ search_text
outfile2.write(line2) unless line2 =~ search_text2

-- 
Posted via http://www.ruby-forum.com/.