my $subs = { "joes_routine" => \&joesub, "marks_routine" => \&marksub, ... }; $subchoice = GetSubToUse(); @args = GetSubArgs(); $subs->{$subchoice}->(@args);
In reply to Re: subroutine refs
by Anonymous Monk
in thread subroutine refs
by CColin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |