austin43 has asked for the wisdom of the Perl Monks concerning the following question:
That is an example of how it currently reads, but I want something a bit easier to scale, as there will be many subroutines to call. How would I have an array contain subroutines and step forward or backward in that array when a certain condition is met? Thanks in advance.$input = <>; if ($input = 0) { &routine0; } elsif ($input = 1) { &routine1; } else { exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Step through an array containing subroutines
by ikegami (Patriarch) on Feb 15, 2011 at 18:06 UTC | |
by austin43 (Acolyte) on Feb 15, 2011 at 18:12 UTC |