Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: How does next label work?

by sundialsvc4 (Abbot)
on Jan 07, 2013 at 22:42 UTC ( #1012124=note: print w/replies, xml ) Need Help??

in reply to How does next label work?

I’m of the opinion that this sort of thing is the very worst kind of “Perl Golf” ... a game with all water-traps and no tee.   The construct is intended to go directly to the next iteration of a “real loop” as designated by the specified label-name.   If you are caught using it where no such loop exists (in the eyes of your co-workers, not Perl), and even if it so happens that Perl’s compiler accepts it, then you nevertheless richly deserve to be designated the one who gets to clean the coffee maker for the next full year.

(Urgh:   you do clean the coffee maker, don’t you??)

Replies are listed 'Best First'.
Re^2: How does next label work?
by LanX (Bishop) on Jan 07, 2013 at 23:05 UTC
    The OP asked "How does next label work?" and provided an edge case example to emphasize his problem.

    Well that's perfectly normal ...and a well documented behavior is hardly "golf".

    And BTW Basic BLOCKs with redo at the end

    { ... ; redo if COND; }
    are a far saner way to realize do-while-loops.
    do { ... } while (COND)


    Iím of the opinion that especially those coworkers which can't use perldoc -f should be restricted to clean the coffee maker. ;-)

    Cheers Rolf

Re^2: How does next label work?
by eyepopslikeamosquito (Chancellor) on Jan 08, 2013 at 08:19 UTC

    I'm of the opinion that this sort of thing is the very worst kind of "Perl Golf"
    Though it's been a while since I've agreed with your opinion, I strongly agree with you this time. It is shockingly bad golf; the label in "next label" is clearly unnecessary, an outrageous waste of precious strokes.

      ... and it is also reason enough to say that one should never, ever make coffee in the office.   Always go to Starbuck’s and order a triple-shot.   Because you never know when something sentient might emerge from the unwashed office coffee-pot ...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012124]
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2018-05-28 09:01 GMT
Find Nodes?
    Voting Booth?