$var2 = 1; # may just be $var $one = '$var'; $two = '$var2'; if(defined(the variable listed in $one)){ print "I don't want to see this\n" }; if(defined(the variable listed in $two)){ print "I want to see this" };