if (defined(sgtest)) or (defined(sgtest@)) { print "got something". } else { print "got nuttin". }