my $bar = ${exists $foo{'bar'} or \undef };