tie my %hash, 'Hash::DefaultValue', sub { 10 }; say $hash{foo}; my $is_this_true = exists $hash{foo};