in reply to switch statement for subroutines?
use Switch; foreach my $val (@array) { switch ($val) { case "do_walk" { do_walk() } case "do_run" { do_run(); } case "do_skip" { do_skip(); } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye: don't use Switch) Re: switch statement for subroutines?
by tye (Sage) on Jul 28, 2001 at 10:44 UTC |