In C, resizing an array invalidates existing pointers to the array.
int* a; a = (int*)malloc(...); int* b = a; a = (int*)realloc(a, ...); /* b now contains garbage */
The OP was asking if the same happens in Perl.
my @array; my $aref = \@array; push @array, ...; # Is $aref still valid? Yes.
In reply to Re^2: array reference
by ikegami
in thread array reference
by cammac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |