in reply to Re^9: Does @{ } copy arrays?
in thread Does @{ } copy arrays?

Hmm ... as far as I understood dave, copying to an rvalue doesn't help, because the array has already been "prepared" for later modification without taking care about any rvalue context !(?)

so calling with arg @a-1 is always the fastest alternative.

Cheers Rolf

Replies are listed 'Best First'.
Re^11: Does @{ } copy arrays?
by ikegami (Patriarch) on Oct 23, 2009 at 20:45 UTC

    because the array has already been "prepared" for later modification without taking care about any rvalue context !

    What? We're talking about a Perl that's fixed to not add the magic for rvalue $#a.

    You said it would be easy to forget foo($#a) is an lvalue and that it's a common occurrence.

    I replied that it's no biggie if it's true. That case can be handled if there is a need.