in reply to Creating two dimensional array
Something like this works (I presume both arrays are of equal length):
my @matrix; for my $i (0 .. $#array1) { $matrix[$i] = [ $array1[ $i ], $array2[ $i ] ]; } use Test::More qw(no_plan); is( $matrix[1][1], $array2[1], "Spotcheck looks good." );
|
---|