in reply to pushing arrays gives unexpected result
In your particular example, push (@out, @newin) returns number of elements pushed into @out, which is 1, and then you assign @out = 1;, which is effectively @out = (1). You should remove the @out= part to make it work as expected:@out = push (@out, @newin);
push @out, @newin;
|
|---|