my @routines = ( \&routine0, \&routine1, ); $routines[$input]->($input = <>); sub routine0 { print "0"; } sub routine1 { print "1"; }
In reply to Re^2: Step through an array containing subroutines
by austin43
in thread Step through an array containing subroutines
by austin43
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |