From: Peter Scott <[EMAIL PROTECTED]> > On Sun, 11 May 2008 02:05:06 +0200, Jenda Krynicky wrote: > > You do not need the label unless you need to jump out of some other > > loop than the innermost. In this case there are no nested loops so it > > would probably be better to skip the label. > > While I personally program the way you suggest, take note that "Perl Best > Practices" says that loops that are explicitly exited should be labelled > in all cases (http://www.oreilly.com/catalog/9780596001735/toc.html), so > we should not criticize people for following the practice.
Looks like yet another case in which I disagree with PBP. IMHO, only the loops that need to be labeled should be labeled. To me a label is a warning sign, something that says "hey, be careful here, this is a place to which we might jump, a loop out of which we might jump while inside another loop or something like that." I can't think of a good similitude, maybe I could compare it to overabundance of trafic signs. If you put up too many, the drivers will become distracted and are more likely to ignore or miss the one that was really important. In either case "would probably be better to" doesn't look like criticizing to me :-) Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/