box-o-sand/RubyFun/round0/blocks.rb

9 lines
289 B
Ruby
Raw Normal View History

2009-06-17 02:33:38 +00:00
# read file and write to archive
File.open("archive.log", "a") do |saved|
File.foreach("mylogfile.log") do |sending|
puts("data = #{sending}")
# Make sure we keep a backup
saved.puts(sending) # removed superfluous string interpolation
end
end