if (exists $xlist{$name} && defined $xlist{$name}) { $xlist{$name} = undef; # this exists now #### if (defined $xlist{$name}) { #### 22:44 >perl -Mstrict -MData::Dump -wE "my %h = (a => 1, b => undef); dd \%h; say $_, defined $h{$_} ? ': yes' : ': no' for qw(a b c); dd \%h;" { a => 1, b => undef } a: yes b: no c: no { a => 1, b => undef } 22:47 >