In a message dated 24 Sep 2002, Aaron Sherman writes:
> This is because push is
> almost certainly defined as:
>
> sub push(@target, *@list) { ... }
That should be
sub push(@target is rw, *@list);
but otherwise I think that's right.
Now, implementation in Perl 6 (though I assume it's actually written in
Parrot). This would obviously work:
sub push(@target is rw, *@list) {
@target[@target.length ..
@target.length + @list.length - 1] = @list;
}
Now, how to do it more Perlishly?
@target = *(@target, @list);
? Or would that have to be
@target = (*@target, *@list);
? Surely
@target = (@target, @list);
or
@target = (*@target, @list);
would not work. Or would it?
Trey