my %hash = ( foo => 'bar', (baz => $quux) x!! $quux, # list repitition, see "x" in perlop ); #### my %hash = ( foo => 'bar', ); if ($quux) { $hash{baz} = $quux; }