http://www.perlmonks.org?node_id=461017

rb_rb has asked for the wisdom of the Perl Monks concerning the following question:

Hallo, I want to get out a list of values out of my database. I tried out the method fetchrow_array and expected to receive an array. But I only got the first matching value, not all. What can be the mistake? And this is the code:
$sql = "select status from sh_protokoll where asek_jn = 'j'"; $sth = $dbh->prepare($sql); $res = $sth->execute(); @ary = $sth->fetchrow_array(); $res = $sth->finish();
Many thanks R.B.