I got it

    flag = "FALSE"
    arr = File.readlines(var1)
    arr.map! {|line| line.split("\t")[2]}
    arr.each_with_index do |line, i|
      if /#{var2}/ =~ line
      flag = "TRUE"
     end
      end
      if (flag == "TRUE")
    puts "SUCCESS: This file " +var1 + " does contain the line"
      end
      if (flag == "FALSE")
    puts "ERROR: This file " +var1 + " does not contain the line"
      end

thanks for the help
-- 
Posted via http://www.ruby-forum.com/.