in reply to pushing arrays gives unexpected result

As the docs for push say:
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.
In other words, it modifies the array in place, and returns the number of elements in the, now larger, array. You want to change:
@out = push (@out, @newin);
to just:
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
    Seems to be unanimous, then :)

    Thanks all for your time