in reply to Problem with array references
Second, your real problem is that you're using symbolic references. $var isn't an array reference. Dominus has written the quintessential explanation of what you're actually doing, and why it's a bad idea.
The fix is to say:
Relevant documentation is in perlref and perlreftut.my @test = qw( test trial good ); my $var = \@test; push @{$var}, "Testing"; print join(' - ', @test), "\n";
|
|---|