From: Bob Hatch Date: 2011-02-03T05:46:42+09:00 Subject: Combining two file write commands 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/.