From: ara.t.howard@... Date: 2006-03-09T06:46:47+09:00 Subject: Re: globals outside of OO scripting On Thu, 9 Mar 2006, rtilley wrote: > When writing methods as functions (I know they're methods pretending to be > functions) do you still need to use globals... like this: > > $global_var > def some_other_function > ... > $global_var > end > > Or, is it OK to use them like this: > > global_var > def some_other_function > ... > global_var > end but why? at the very least do class Main def initialize @foo = 42 end def run p @foo end end Main::new unless $0 == __FILE__ save the namespaces! ;-) -a -- knowledge is important, but the much more important is the use toward which it is put. this depends on the heart and mine the one who uses it. - h.h. the 14th dali lama