in reply to Initializing a subroutine with the value of a variable

Yes it's possible but for good reasons it's not recommended!

That's why it's not allowed with use strict so you need to disable strict locally!

use strict; our $a="func"; sub func {print shift}; { no strict 'refs'; &$a(42); }
But this approach should only be the last possible choice!

hollis solution is much cleaner and defining a dispatch table can be done in a very compact way:

my %dispatch=( func1 => sub { print shift }, func2 => sub { print 1+ shift }, ); $dispatch{func1}->(42);