From: rtilley Date: 2006-03-09T06:53:42+09:00 Subject: Re: globals outside of OO scripting Bernhard 'elven' Stoeckner wrote: > 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 > > > No, you still need to use either global or instance variable syntax, since > it is, as you correctly state, still a class. OK, but the script works wheter I use $ for globals and @ for instance variables or not. With small scripts, why does it matter?