我想从switch语句的中间跳,在下面的代码的循环语句: while (something = get_something())
{
switch (something)
{
case A:
case B:
break;
default:
// get another something and try again
当我运行此: use feature ':5.10';
$x=1;
given ($x) {
when(1) {
say '1';
$x = 2;
continue;
}
when (2) {
say '2';
}
}
这应当同时打印1和2,但它只能打印1.我失去了一些东西? 编辑: 我已经加入$ x