sub { my ($hashref, $key) = @_; my %hash; tie %hash, ....; $hashref->{$key} = \%hash; }