From: Stefan Codrescu Date: 2009-02-27T10:51:05+09:00 Subject: Setting the contents of a file to a variable? --0016364ee0229ad1960463dcb61c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Ok so... Ok... so I have file1 and it contains a number and I want file2 to tell me what that number is file2 would be something like class Tell def get_num(file = "file1.txt") num = contents of file1 $num = num end def tell_num puts "The number in file1 is #{$num}." end end What do I put instead of "contents of file1" Or some completely new code that does the same thing. -- There was a man, they called him mad. The more he gave, the more he had. --0016364ee0229ad1960463dcb61c--