sub nothing { return } sub something { return undef } my %foo = ( abc => nothing() ); my %bar = ( abc => 123, something() );