I think this will do the trick:
use DBI; my $dbh = DBI->connect(...); my $stmt = 'select id from items where foo > 42'; my @ids = map { $_->[0] } @{ $dbh->selectall_arrayref($stmt) };
map is used to convert an array of rows of fields into an array of (what's in the first field of each row).
In reply to Re: DBI select ids to @list
by ikegami
in thread DBI select ids to @ids
by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |