in reply to Speed of Array Returns
Note that a subroutine doesn't return an array, but rather a list. That can make a lot of difference. Consider this code:
If perl returned by reference (as you seem to suggest), this would print 1234, now it prints 123.use 5.010; { my @a = (1, 2, 3); sub a { return @a; } } my @x = a(); push @x, 4; say a();
You can't have everything and a pony...
|
|---|