note
NetWallah
[http://search.cpan.org/~timb/DBI/DBI.pm#fetchall_arrayref|fetchall_arrayref] will return what you say you want to accomplish - a single call that returns a multi-dimensional array. You will not need the "while" loop, unless you want to iterate the array, in which case, a "for" loop is more appropriate.
<p>
Here is sample code:
<c>
my @allrows = @{ $sth->fetchrow_arrayref() }; # Expand ref, to simplify access
my $first_author = $allrows[0][0];
my $second_author = $allrows[1][0];
my $first_title = $allrows[0][1];
</c>
Also, access to a scalar element of an array is correctly written as
<c>
$language = $row[2]; # Correct
$language = @$row[2]; # wrong (at least in perl ver 5)
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-159887">
<p> <small>
"By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."
-Confucius
</small></p>
</div></div>
1010560
1010560