You may find the jump into the while loop more legal, if you think about it like this: you could omit the braces completely, and change the while (or redo) to an if-goto construct. The C version with the case statement is still wierd, as the C switch statement is misused, but the Perl version does not use this strange idiom. (Well, maybe you could write a case-based version in perl too, I'm not sure. The postfix when will have fall-through in perl6.)
In reply to Re: Duff's Device
by ambrus
in thread Duff's Device
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |