which worked fine. But in CGI::Application I'm using $self->, as in:
$self->$all_subs[1]->();
Use:
my $code=$all_subs[1]; $self->$code();
This will call $code as a method on $self, which AIUI is what you want. If you would like to do the same without an intermediate variable, then I wondered too and it turns out to be possible, albeit in a somewhat convoluted way.
In reply to Re^3: How to call subroutines using variables ?
by blazar
in thread How to call subroutines using variables ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |