LINE: while(<>) { # ... next LINE if ... # ... } SEARCH: for (@list) { # ... last SEARCH if ... }
Do you do so only in long blocks? Complicated blocks? Do you have a consistent style for when and how to label loops or is it more of a "whatever seems good at the time" approach? I ask not to be difficult but because in a single non-nested loop I just don't see any additional clarity being added by loop labels. If you see a benefit can you describe the situations where you find it beneficial versus those where it is ok to not label the loop?
In reply to Re: Re (3): Thoughts on naming loop LABEL: (TMTOWTDI, why label loops?)
by Anonymous Monk
in thread Thoughts on naming loop LABEL:
by ybiC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |