my @command = split /\s+/, $input; my $cmd_name = shift @command; complain("$cmd_name isn't a command\n") unless exists $dispatch_table{$cmd_name}; $dispatch_table{$cmd_name}->(@command); # And the function called with handle "floober with sword"