if ($foo{'test'} eq 'bar') { } # Becomes # exists could be defined depending on circumstances. if ( (exists $foo{'test'}) && ($foo{'test'} eq 'bar') ) { }