I take it the real problem is that your query is not returning any data. Could it be that you're loading @duplist from a file, and it ends with a newline? Try adding:
chomp $custnum; before your execute() call. -----Original Message----- From: John [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 6:14 PM Cc: dbi-users@perl.org Subject: Re: select placeholder I don't think that is the issue, in fact I don't think it is a DBI/SQL issue at all because when I do this: [code] { #$custnum = shift @duplist; #redo if int($custnum) == 0; $custnum = "000281610"; <===####### $sth1->execute( $custnum ) or die "couldn't execute... " . DBI->errstr; while (my $rowref = $sth1->fetchrow_arrayref) { ($asset, $custnum, $branch, $customer, $address, $town, $postcode) = @$rowref; [/code] it works. I will look into how I load @duplist and if I have further problems I will take them elsewhere. -- Regards John McMahon ([EMAIL PROTECTED])