in reply to Re^2: calling subroutines from variables
in thread calling subroutines from variables
Of course, if you have a lot of subroutines, you may still want symbolic refs to help construct the hash:
my %dispatch = map { ; no strict 'refs' ; ($_, \&$_) } qw(sub1 sub2 +sub3 ...) ;
|
|---|