Shlomi Fish <shlo...@iglu.org.il> writes:
[...] > sub dispatch > { > my ($method, @rest_of_args) = @_; Not sure what $method is supposed to be doing. > my %dispatch = > ( > 'N' => sub { return N_func(@rest_of_args); }, > 'L' => sub { return L_func(@rest_of_args); }, > . > . > . > ); > > return $dispatch{$method}->(); > } Where is $method being sent? What I'm trying to do: Iterating through a list of lists using a dispatch table to `dispatch' one member of each list fed to it, or sometimes the whole list needs to be acted on. I'm trying to work up a good example but having to experiment a lot to get even that done. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/