From: Randy Lawrence Date: 2004-07-03T02:49:07+09:00 Subject: How to detect if variable has been defined yet? Hi, I'd like to detect if a variable has been defined yet. Is this possible in Ruby or mod_ruby? For example, I'd like to do the following: if $total.exists $total = $total + 1 else $total = 0 end