This is an interesting scenario that had me going for hours to figure
out. I've cut-n-pasted the relevent sections below in a brief edited format
for simplicity.
$sth=$rbh->prepare("SELECT * from table where field='$value[1]'")
$sth->execute;
while (@tvalue=$sth->fetchrow_array)
{ $match++; }
print "@tvalue\n";
This caused the output to print nothing ..... But when I altered it as
so ...
$sth=$rbh->prepare("SELECT * from table where field='$value[1]'")
$sth->execute;
while (@tvalue=$sth->fetchrow_array)
{ @dummy = @tvalue; }
print "@dummy\n";
Then the results would show up. This seems a little confusing as it
implies to me that the scope of @tvalue is only local to the while loop.
This is being run on Oracle 8.1.5 and Oracle 8.1.7 with Perl build 522,
DBI 1.14, DBD-Oracle 1.03 on Windows NT platforms.
Robert E. Jones, BSCS, BSP
81 CS/SCK, Keesler AFB