my %f; %f=(One=>1, two=>sub{$f{One}} ); # Flatten all the subs .. ref $f{$_} eq 'CODE' and $f{$_}=$f{$_}->() for keys %f; print Dumper \%f; # All populated