for my $total_info(@$Count) {
print "$total_info->[0]\n";
}
In the for statement, you extract a single element of the array in a loop (the inner array reference). The print statement prints out the first element of the inner array reference.
Will you ever get more than one record returned per call? If not, you might consider not using fetchall_arrayref, as that's why you have an aref inside of a top-level aref. fetchall_* implies that you're expecting several records returned. If you only ever expect one piece of data returned per call, use fetchrow_arrayref. |