if (!defined($foo) ) { print "$foo is undefined.\n"; }