From: Peter Loftus Date: 2007-12-14T19:06:24+09:00 Subject: Re: pulling out a specfic feild from a line 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/.