tony summerfelt <snowzone5 / hotmail.com> writes:

> unfortunatley it doesn't do me any good, as i'll want to undef
> it later.

Yes, but I think you may have missed something which (I think)
was mentioned earlier -- ruby automatically "defines" local
variables when they are parsed.  Try it in irb:

irb(main):001:0> p a
NameError: undefined local variable or method `a' for main:Object
        from (irb):1
irb(main):002:0> a = 1 if false
=> nil
irb(main):003:0> p a
nil
=> nil
irb(main):004:0> p a.id
4
=> nil

So, using defined? in the way you used it in perl is really not
going to help you...  Even though the "a = 1" was not evaluated,
a still becomes a local variable, bound to nil.

-- 
Josh Huber