Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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??)


Comment on Re: How does next label work?
Re^2: How does next label work?
by LanX (Canon) 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)

    EDIT:

    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 (Canon) 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-12-21 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls