in reply to How to use a scalar variable to call a subroutine?

I might approach this by using tokens and associating them with their respective coderefs:
my %CODE = ( one => \&one, two => \&two, three => \&three, _default => \&not_found, ); my $input = whatever; ($CODE{$input} || $CODE{_default})->(@arguments);