in reply to Re^2: Split does not behave like a subroutine
in thread Split does not behave like a subroutine

The docs were written by different persons, and are hence heterogeneous and not consistent.

(kind of "there is more than one way to word it" ... well )

Even perlglossary which originates from the Camel-Book seems to have been patched afterwards.

For a trained mathematician used to an axiomatic approach it's a painful experience ... >(

So I'd strongly recommend to

In an ideal world any other perldoc should be corrected.

I never acquired the Camel book I know it's vast but should be canonic.

It's a long time since I had a look into chromatics "Modern Perl", but it left very consistent impression. So maybe a good source, not sure if he clarifies "lists" there.

update

Modern::Perl#Lists

confusing too.

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

  • Comment on Re^3: Split does not behave like a subroutine (inconsistent perldocs)

Replies are listed 'Best First'.
Re^4: Split does not behave like a subroutine (inconsistent perldocs)
by bojinlund (Monsignor) on Jul 21, 2020 at 20:08 UTC

    Thanks LanX for the effort and answers! I am very grateful.

    To understand something you need to create a conceptual model of it. I have realized that my model of Perl and the perl interpreter was not adequate.

    By following your advice to deparse the generated code, I have start to understand what is going on. I have also read some introductions to the perl interpreter.

    To know the use of the

    Value Stack

    This stack stores the values that regular perl code is operating on, usually intermediate values of expressions within a statement. The stack itself is formed of an array of SV pointers.

    for the transfer of parameters to and return values from subroutines, helps me to build my model.

      Yes, that's pretty much also my mental model, I'm glad I helped you.

      And rest assured many people have (unfortunately) a different one. :/

      I wished it was better communicated.

      Part of the problem is that Perl is advertising itself as kind of a natural language with a lot of DWIM and idiomatic constructs, which shows in the style of the docs.

      But at the end you need to communicate the technical basics in a clear, concise and orthogonal way to avoid confusion and frustration thru perceived ambiguities.

      Much potential is wasted here...

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