John, thanks for your thoughts. The foreach loops through a list of authors. The input file has multiple authors separated by a '|' in a single 'author' field. I want to put each author into a table, and link authors to articles with a 'join' table of author ids and article ids. I thought that the selectrow_array would work for this.
However, I took your suggestion and used prepare and fetchrow_array, and my program is working now. Thanks, again, for all your help and advice. -Kevin >>> "Moon, John" <[EMAIL PROTECTED]> 05/05/05 04:16PM >>> Well looking at your code ... right before the DBI call you do a "foreach"... That would indicate, to me, that you "expected" to "fetch" more than one row... but if you truly expect to only fetch one row then yes, do the selectrow_array. But if not... The DBI "prepare" function is "similar" to declaring a cursor in PLSql then you only "pay once" to parse the SQL... The execute is "like" the PLSql open of a cursor... and the fetchrow_array is "like" fetch cursor into statement... I also like very much the DBI functions selectall_arrayref and selectall_hashref function for one time small sets/subsets of data. This is a really nice package with lots of ways to do the same thing different ways given different circumstances. Choose what is best for you... jwm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>