in reply to perl string pass by value

Remember that Perl was originally architected at a time when memory was at an extreme premium and CPUs were very slow. The internal handling of strings has changed to fit the times but plenty of old source code reflects what used to be.

Replies are listed 'Best First'.
Re^2: perl string pass by value
by LanX (Saint) on Apr 02, 2018 at 19:02 UTC
    > Remember that Perl was originally architected at a time when memory was at an extreme premium and CPUs were very slow.

    How is unnecessary copying saving memory?

    IMHO Perl just reflected the behaviour of C.

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

      And yet, today's runtime Perl implementations must somehow strive to accommodate all of this "old" source-code, as graciously as it possibly can ... without breaking any of its now-oh-so-old assumptions . . .
Re^2: perl string pass by value
by Your Mother (Archbishop) on Apr 03, 2018 at 09:27 UTC

    Without some kind of citation or description of what you describe one must assume you're talking through your hat.