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

Not sure what you mean here. Are you complaining about the use of the ampersand with the function call? I usually advise against that too, but in this case the behavior is the same with or without it.

Replies are listed 'Best First'.
Re^3: How come @_ gets changed here?
by kcott (Archbishop) on Jun 10, 2017 at 19:26 UTC

    You raise a valid point and I'm definitely not "complaining" about anything. Like you, I "usually advise against" that usage.

    My intention was to point out, quite unequivocally, that there was a difference between

    &sub(@args)

    and

    sub(@args)

    Reviewing what I originally wrote, it's perhaps not immediately obvious that, without a valid reason for writing

    &sub(@args)

    it would generally be preferable to write

    sub(@args)

    Thankyou for raising this point and providing an opportunity for clarification.

    — Ken

Re^3: How come @_ gets changed here?
by LanX (Saint) on Jun 10, 2017 at 19:24 UTC

      Well, it can bypass prototype checks, though in this case the sub has no prototype.

        Right, I was answering the general question if &ersand makes a difference.

        This thread drift isn't really relevant for the OP.

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