I just came across a piece of code that reduces to:
$n = 10; while( $n ){ print $n--; } continue{ sleep 1; }
Which as far as I can see is identical in behaviour to:
$n = 10; while( $n ){ print $n--; sleep 1 }
Is there any benefit to the first form?
I can't ever remember having used it. Do you? Could you post an example or two of its real world uses?
In reply to while(){}continue{}; Useful? by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |