in reply to DBI select ids to @ids
Did you look at the Monastery Tutorials?
DBI Recipes has a section on just that idiom you are asking about (and much more).