my $info = \%$fun; # or my $info = {}; @$info{ keys %$fun } = values %$fun;