http://qs321.pair.com?node_id=963032


in reply to Re: Sub ref from string without eval
in thread Sub ref from string without eval

\&{$x} works perfectly fine with strict refs. It is only implicit usage of strings as references that is prohibted by strict refs. If you go to the length of writing \&{ ... }, perl assumes a symbolic reference is indeed what you want.
use strict; use warnings; use 5.010; sub Foo { 'in sub Foo' } my $x = 'Foo'; my $sub_ref = \&{$x}; say $sub_ref->(); __END__ in sub Foo