$dbh = "select * from table where field = ?"; $dbh = [$value]; while ( my $row = $dbh ) { print $row->[0], "\n"; }