Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
push returning total number elements instead of number new elements #8116
Created by firstname.lastname@example.org
The return value for push is the total number of elements in the array.
According to the docs, push:
"Returns the new number of elements in the array."
my @j = (1..100);
Should display 1, but it displays 101.
I believe that should be interpreted "the new (total) number of elements
On Fri, Sep 16, 2005 at 01:38:41PM -0700, David Ljung Madison wrote:
push returns the new (number of elements) in the array, not the number of
On Sep 16, 2005, at 4:38 PM, David Ljung Madison (via RT) wrote:
Right -- the new number of elements, as opposed to the number of new
My reading of the docs you quoted is consistent with the exhibited
The documentation of "push" has been clarified to indicate that it
Change 25678 by stevep@stevep-kirk on 2005/10/02 04:42:46
Clarify the documentation regarding the return value from C<push>.