From: Robert Klemme Date: 2008-06-27T16:00:51+09:00 Subject: Re: File question 2008/6/27 Justin To : > Hi, > > File.open('file.txt', 'r').each do |c| c.chomp! > if(c=="__#{t.month}/#{t.mday}/#{t.year} \(#{t.zone}\)") > e=true > end > end > > E.g. of date in file > __6/26/2008 (Pacific Daylight Time) > > > I'm trying to see if the date already exists in file.txt. Since it > already does, it must set e=true, but the if(c== ...) statement doesn't > seem to evaluate to true, so e never becomes true! =( > > Thanks for the help! > -- > Posted via http://www.ruby-forum.com/. > > -- use.inject do |as, often| as.you_can - without end