in reply to Re: How come @_ gets changed here?
in thread How come @_ gets changed here?

According to perlsub inside a subroutine the elements of @_ are aliased to the items in the list that are passed to the subroutine. Passing by reference means you pass one or more references in the arguments to the subroutine. Then elements of @_ are aliased to the references and you can make local copies inside the subroutine.

Replies are listed 'Best First'.
Re^3: How come @_ gets changed here?
by LanX (Saint) on Jun 12, 2017 at 15:11 UTC
    "Pass By Reference" (vs. "Pass By Value") is a general computer science term which is implemented as "aliasing" in Perl.

    Perl's "references" are totally different.

    update

    Context matters: Canadians are North Americans proud not to be Americans. ;)

    update

    OK, I consider this perlsub#Pass-by-Reference a documentation bug.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!