in reply to Check to see if a variable exists

you can do the following to see if a var is defined:
my $var_val; if(defined($var_val)){ print "defined"; } else{ print "undefined": }
this case would pring undefined. if you had
my $var_val = 'something';
it would have printed: defined