if (defined $foo{'bar'} and $foo{'bar'} eq 'baz'){ } #### if (exists $foo{'bar'} and $foo{'bar'} eq 'baz'){ }