defined EXPR defined Returns a Boolean value telling whether EXPR has a value other than the undefined value "undef". If EXPR is not present, $_ is checked. #### #!/usr/bin/perl use warnings; use strict; print defined (undef) ,"\n"; # prints nothing but a newline my $y = undef; print defined ($y),"\n"; # prints nothing but a newline my $x = ''; print defined ($x), "\n"; # prints a 1