in reply to Re: and multiple statements
in thread and multiple statements

I agree, 2¢ in the kitty. This is the style I prefer and gravitate toward. I tend to use names too so I think it would even read well to those who don't like this style.

NUM: for( 1..10) { $_ & 1 and warn "odd" and next NUM; print "$_ is good and even\n"; }

Replies are listed 'Best First'.
Re^3: and multiple statements
by BrowserUk (Patriarch) on Jun 06, 2010 at 22:54 UTC
    I tend to use names too

    I only use names in nested loops where I need to break out of nested levels. And I think I've had that arise maybe twice in 8 years.

    Generally, these kind of short circuit guards tend to be at (or very close to) the top of the loop body they short-circuit, which (IMO) renders the labels redundant.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.