From: montana Date: 2002-11-16T04:20:36+09:00 Subject: Simple Newbie IO question. Hi Everyone- I'm reading the "Pick-axe" book. In the chapter on IO it discusses File.open. Straight from the book: File.open("testfile", "r") do |aFile| # ... process the file end I tried something similar in irb: irb(main):001:0> File.open("testfile", "w") do |aFIle| irb(main):002:1* aFile << "Hello,\nWorld!" irb(main):003:1> end NameError: undefined local variable or method `aFile' for # from (irb):2 from (irb):1:in `open' from (irb):1 What am I doing wrong here?? What is the correct way to pass a string to a file and then open that file again to read it? Thanks. SA