in reply to pushing arrays gives unexpected result
In other words, it modifies the array in place, and returns the number of elements in the, now larger, array. You want to change:push ARRAY,LIST Treats ARRAY as a stack, and pushes the values of LIST onto the end of ARRAY. The length of ARRAY increases by the length of LIST. *snip* Returns the new number of elements in the array.
to just:@out = push (@out, @newin);
push (@out, @newin);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pushing arrays gives unexpected result
by Anonymous Monk on Feb 10, 2004 at 23:31 UTC |