my $sub_name = 'this'; my $x = do { no strict 'refs'; \&$sub_name }; print $x->(), "\n"; sub this { return "hi"; }