- or download this
use Switch;
...
case (\&sub) { print "arg to subroutine" }
else { print "previous case not true" }
}
- or download this
syntax (switch (EXPR) CODE) { # eval the expr first to avoid
# reevaluation at each case
...
SUB(EXPR)
}
}
- or download this
parser = new Parse::RecDescent (q{
expression: and_expr '||' expression | and_expr
...
brack_expr: '(' expression ')' | identifier
identifier: /[a-z]+/i
);