my %commands = ( mul => \&mul, add => \&add, set => \&set, ... ); #### $commands{$command}($register, $param);