my %table = map { $_ => \&{'func_'.$_} } 'A'..'E'; for (split //, $func_com) { push @all_res, [ $table{$_}->(@some_val) ]; }
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Howto avoid large hard-coded else-if function calls
by shmem
in thread Howto avoid large hard-coded else-if function calls
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |