Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Split does not behave like a subroutine (inconsistent perldocs)

by bojinlund (Prior)
on Jul 21, 2020 at 20:08 UTC ( #11119621=note: print w/replies, xml ) Need Help??


in reply to Re^3: Split does not behave like a subroutine (inconsistent perldocs)
in thread Split does not behave like a subroutine

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.

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

Replies are listed 'Best First'.
Re^5: Split does not behave like a subroutine (mental model)
by LanX (Cardinal) on Jul 22, 2020 at 13:32 UTC
    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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2020-09-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (115 votes). Check out past polls.

    Notices?