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


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).