From: Robert Klemme Date: 2010-02-19T21:00:47+09:00 Subject: Re: Global variables usage 2010/2/19 di vi : > botp wrote: >> On Fri, Feb 19, 2010 at 3:02 PM, di vi wrote: >>> >>> 2) to print the global variable (gprint.rb) >>> >>> Code: >>> � �loop do >>> � �puts $foo >>> � �end >> >> where in this code (gprint.rb) does it say that you are accessing the >> file var.rb ? >> read on require and load... >> >> best regards -botp > > Load and require execute the complete program..I want only the value of > global variables to change in the respective .rb file. Well, there's an obvious solution to that: place the global variable in a file on its own which you load from all places that need it. However, I am not sure that this is generally a good idea. What do you need that for? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/