From: Peter Loftus Date: 2007-12-06T20:35:55+09:00 Subject: if /hello/ =~line Got help with this code earlier its just checking a file for a line Im really new to ruby ive used java and C before just wondering what do i put in if i want to use a variable that is holding the string eg VAR1 = "hello" File.foreach "file.txt" do |line| if /hello/ =~ line puts "found it" break end end -- Posted via http://www.ruby-forum.com/.