in reply to Re: How to call subroutines using variables ?
in thread How to call subroutines using variables ?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to call subroutines using variables ?
by blazar (Canon) on Jun 09, 2007 at 17:56 UTC | |
by bradcathey (Prior) on Jun 09, 2007 at 19:48 UTC | |
by chromatic (Archbishop) on Jun 10, 2007 at 04:23 UTC | |
by bradcathey (Prior) on Jun 10, 2007 at 12:25 UTC | |
by chromatic (Archbishop) on Jun 10, 2007 at 17:32 UTC | |
by blazar (Canon) on Jun 10, 2007 at 07:32 UTC |