in reply to Problem with passing array in a sub

If @test contains arrays as elements, then these are actually arrayrefs. Therefore, you must dereference each element using
my @row3 = @{ $test[2] };
This is how nested data structures work in Perl.