I would use a dispatch table like the following. It's a little effort to set it up, but that prevents you from calling unforeseen functions for malicious or erroneous inputs:
my %dispatch = ( 'func1_1' => \&func1_1, 'func1_2' => \&func1_2, 'func2_1' => \&func2_1, ); $dispatch{ 'func' . $number1 . '_' . $number2 }->( @params );
In reply to Re: Dynamic functions
by egga
in thread Dynamic functions
by himik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |