use strict; my %a; $a{"abc"} ++; print $a{"abc"}; #### use strict; my %a; check(); print "now set abc to undef\n"; $a{"abc"} = undef; check(); sub check { print "defined\n" if (defined($a{"abc"})); print "exists\n" if (exists($a{"abc"})); }