Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Python gave me a colonic

by Paladin (Vicar)
on Aug 24, 2020 at 22:46 UTC ( #11121060=note: print w/replies, xml ) Need Help??

in reply to Python gave me a colonic (solved - brainfart)

It is valid code. else: is a label, and LABEL BLOCK is valid perl syntax.

Replies are listed 'Best First'.
Re^2: Python gave me a colonic
by LanX (Sage) on Aug 24, 2020 at 23:21 UTC
    Correct, but

    > LABEL BLOCK is valid perl syntax.

    to be more precise

    LABEL: and { NAKED BLOCK } are already valid in isolation, they don't need to be compounded.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Re^2: Python gave me a colonic
by bobn (Chaplain) on Aug 25, 2020 at 00:50 UTC
    OK, then, yes, it's a label. I saw else with a colon and didn't even think about labels, even though I've used them many times over the years.

    Actually, it seems a little odd that a keyword is permitted to be used in this fashion, but whatever.

    Thanks for the explanation. I'm gonna blame it on Guido, lol.

    --Bob Niederman,

    All code given here is UNTESTED unless otherwise stated.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-05-22 22:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (81 votes). Check out past polls.