use Switch; foreach my $val (@array) { switch ($val) { case "do_walk" { do_walk() } case "do_run" { do_run(); } case "do_skip" { do_skip(); } } }
In reply to (ar0n: use Switch) Re: switch statement for subroutines?
by ar0n
in thread switch statement for subroutines?
by zupereva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |