in reply to An Array Without and Index
my $addr_lookup = 'SELECT u2addr.id FROM u2addr WHERE u2addr.addr = ?'; my $stm = $dbh->prepare($addr_lookup); foreach my $addr (@addr) { $stm->execute($addr); my @results=(); while (my @row = $stm->fetchrow_array) { push (@results, [@row]); #push array ref to @row #using new memory and copy of @row #could also just fetchrow_arrayref } ## do something with @results here... ## perhaps: "print Dumper \@results;" ## to see what you have in @results? }
|
|---|