I tried:
my @all_subs = (\&sub_1,\&sub_2); $all_subs[1]->();
which worked fine. But in CGI::Application I'm using $self->, as in:
$self->$all_subs[1]->();
but got a syntax error (doesn't like the 2nd arrow operator). How can I get around this? Thanks.
Update: fixed some punctuation
In reply to Re^2: How to call subroutines using variables ?
by bradcathey
in thread How to call subroutines using variables ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |