sub hpush (\%@) { my ($hash, %add) = @_; $hash->{$_} = $add{$_} for keys %add; } my %config = ( home => '/home/foo', temp => '/tmp' ); hpush %config, root => '/root', sbin => '/usr/sbin';