in reply to Re: creating 2D arrays
in thread creating 2D arrays
Without this constructor your array is called in scalar context and it'll just return the number of elements it contains.Small correction.
push does not evaluate its second argument in scalar context, rather it expects a list. Even if a scalar is pushed, it would be as if the second parameter is a one-element list.
|
---|
In Section
Seekers of Perl Wisdom