Array of Array refs



Hi All-
I am trudging through some DBI, XML, etc.. I had a problem and was
baffled by how to get at array elements out of a series of pushed
array refs. But, by simplifying the problem, I found that the syntax I
used was in error. here is the small sample, already debugged. Hope
this helps someone...

#!/usr/bin/perl

my @tRespsA;

my @fieldList = ( "one", "two", "three", "four" );
my @r1 = ( 1, 2, 3, 4 );
my @r2 = ( 13, 14, 15, 16 );
my @r3 = ( 23, 24, 25, 26 );

push @tRespsA, \@r1;
push @tRespsA, \@r2;
push @tRespsA, \@r3;

foreach my $tRowRef ( @tRespsA ) {
my $tCnt=0;
foreach my $tFld (@fieldList) {
#if ( $tRowRef->[ $tCnt] eq "") { next; }
print $tFld . "='" . $tRowRef->[ $tCnt++ ] . "' \r";
}
}

.