perlsyn to the rescue:
Fall-through
You can use the continue keyword to fall through from one case to the next:
given($foo) { when (/x/) { say '$foo contains an x'; continue } when (/y/) { say '$foo contains a y' } default { say '$foo does not contain a y' } }
Note: I'm looking in perlsyn from 5.012_002.
Dave
In reply to Re: given/when one case prefixes another
by davido
in thread given/when one case prefixes another
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |