J
Justin To
Hi,
File.open('file.txt', 'r').each do |c|
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!
File.open('file.txt', 'r').each do |c|
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!