$i = undef; print(defined($i) ? "[$i]" : 'undef', "\n"); $i = !1; print(defined($i) ? "[$i]" : 'undef', "\n"); __END__ output ------ undef []