note
farang
<p>
<blockquote>
You need to push on @AoA a reference to @vector:
<c>
my @vector = (4.3125, 0.4375);
push @AoA, \@vector;
@vector = (4.375, 0.375);
push @AoA, \@vector;
</c>
</blockquote>
That way is buggy, though, as the redefinition of <tt>@vector</tt>
will clobber the first <tt>push</tt>ed array element. This is
explained under [doc://perldsc#COMMON-MISTAKES] in <tt>perldsc</tt>,
"taking a reference to the same memory location repeatedly".
</p><p>So both lines above should instead use a square bracket reference.
<c>
push @AoA, [ @vector ];
</c></p>
1101426
1101689