my %funcs = ('A'=>\&func_a, 'ABC'=>\&func_c); #etc #... #and then call it as push @res, $funcs{$func_com}->(@someval);
update checking for existance of function in the hash was left as an excercise for a reader
:)
In reply to Re: Howto avoid large hard-coded else-if function calls
by vkon
in thread Howto avoid large hard-coded else-if function calls
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |