This illustrates two points: a) that it's much cleaner to use a Perl-style foreach loop if you're going to be capturing the whole array anyway, and b) that the way to get the maximum subscript of an array reference is to put braces after the $#.for my $row (@{$sth->fetchall_arrayref}) { # note $row is an actual ro +w, not a number my $h = $row->[0]; $Data{$h}{$tableFts{$table}[$_]} = $row->[$_] for 1 .. $#{$row}; }
In reply to Re: mapping 2nd array
by Errto
in thread mapping 2nd array
by jls13
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |