in reply to Re^3: Label makes a sub to return empty list -- "secret"? documented?
in thread Label makes a sub to return empty list -- "secret"? documented?

It's not performance this time. Intuitively, labels belong to the same "subordinate" "category" as e.g. semicolons, both not far from comments and white-space. Extra semicolon at the end of a block doesn't change what this block evaluates to. Lone label, I now know, does, which is dangerous. Neglected to have been (temporarily?) commented-out along with its loop (if placed per PBP at the next line) and maybe some further statements. Of course, it's the same weird nonsense, please ignore.

  • Comment on Re^4: Label makes a sub to return empty list -- "secret"? documented?

Replies are listed 'Best First'.
Re^5: Label makes a sub to return empty list -- "secret"? documented?
by LanX (Saint) on Sep 14, 2025 at 20:48 UTC
    OK I see your point now, but it's a bit contrived to have expectations about the new return value after commenting a trailing loop out.

    (IIRC is the return value of a loop not defined.)

    Anyway thanks for the discussion, I learned something new. :)

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