Hi Miller,
Thank you for your answer. However, I don't understand how you get statement handle $sth
the return value of $dbh->selectcol_arrayref is the reference to the column which containing all the values of rows. But you treated it as a statement handle.
As you can see from my previous code, I put the reference to an array containing the values of the column from each row into @ary. But you seem put every value of row into this @ary which is what I tried to avoid.
Could you explain more to me? Thanks.